File: flusher.go

package info (click to toggle)
golang-github-globocom-go-buffer 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 404 kB
  • sloc: makefile: 6
file content (15 lines) | stat: -rw-r--r-- 283 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package buffer

type (
	// Flusher represents a destination of buffered data.
	Flusher interface {
		Write(items []interface{})
	}

	// FlusherFunc represents a flush function.
	FlusherFunc func(items []interface{})
)

func (fn FlusherFunc) Write(items []interface{}) {
	fn(items)
}