Documentation ¶
Index ¶
Constants ¶
View Source
const ( // OffsetOldest represents the smallest offset still available // Use it to consume all messages, starting at the first available OffsetOldest int64 = -2 // OffsetNewest represents the offset that will be used for the next produce // Use it to consume only new messages OffsetNewest int64 = -1 // OffsetInvalid is the offset returned when error is detected OffsetInvalid int64 = -3 )
Variables ¶
View Source
var ErrCorrupted = errors.New("message corrupted")
View Source
var ErrInvalidOffset = errors.New("invalid offset")
View Source
var ErrNotFound = errors.New("not found")
View Source
var Invalid = Message{Offset: OffsetInvalid}
Functions ¶
func ValidateOffset ¶
Types ¶
type Reader ¶
type Reader struct { Path string // contains filtered or unexported fields }
func OpenReader ¶
func OpenReaderMem ¶
type Writer ¶
type Writer struct { Path string // contains filtered or unexported fields }
func OpenWriter ¶
func (*Writer) SyncAndClose ¶
Click to show internal directories.
Click to hide internal directories.