Documentation ¶
Index ¶
Constants ¶
View Source
const EVENT_BUFFER_SIZE = 200
View Source
const READ_BUFFER_SIZE = 4 * 1024 // XXX: 4kb chosen at random
Variables ¶
View Source
var TempDir = ""
by default, use the system temp dir; this is overridden in tests so they can reliably clean up.
Functions ¶
This section is empty.
Types ¶
type Stream ¶
type Stream struct { Path string // contains filtered or unexported fields }
func (*Stream) Observe ¶
func (self *Stream) Observe(start, stop int64) *StreamHandle
func (*Stream) Unobserve ¶
func (self *Stream) Unobserve(handle *StreamHandle)
type StreamHandle ¶
type StreamHandle struct { Start int64 Stop int64 // Current offset in StreamHandle. Offset int64 // contains filtered or unexported fields }
func (*StreamHandle) WriteTo ¶
func (self *StreamHandle) WriteTo(target io.Writer) (n int64, err error)
The WriteTo method is ideal for handling the special use cases here initially we want to optimize for reuse of buffers across reads/writes in the future we can also extend this mechanism for reading from disk if events "fall behind"
Click to show internal directories.
Click to hide internal directories.