Documentation ¶
Index ¶
- Constants
- Variables
- type Cleaner
- type CommitLog
- func (l *CommitLog) Append(b []byte) (offset int64, err error)
- func (l *CommitLog) Close() error
- func (l *CommitLog) DeleteAll() error
- func (l *CommitLog) Init() error
- func (l *CommitLog) NewReader(offset int64, maxBytes int32) (io.Reader, error)
- func (l *CommitLog) NewestOffset() int64
- func (l *CommitLog) OldestOffset() int64
- func (l *CommitLog) Open() error
- func (l *CommitLog) Read(p []byte) (n int, err error)
- func (l *CommitLog) Segments() []*Segment
- func (l *CommitLog) TruncateTo(offset int64) error
- type DeleteCleaner
- type Entry
- type Message
- type MessageSet
- type Options
- type Reader
- type Segment
- func (s *Segment) Close() error
- func (s *Segment) Delete() error
- func (s *Segment) IsFull() bool
- func (s *Segment) Read(p []byte) (n int, err error)
- func (s *Segment) ReadAt(p []byte, off int64) (n int, err error)
- func (s *Segment) SetupIndex(path string) (err error)
- func (s *Segment) Write(p []byte) (n int, err error)
Constants ¶
View Source
const ( LogFileSuffix = ".log" IndexFileSuffix = ".index" )
Variables ¶
View Source
var (
ErrIndexCorrupt = errors.New("corrupt index file")
)
View Source
var (
ErrSegmentNotFound = errors.New("segment not found")
)
Functions ¶
This section is empty.
Types ¶
type CommitLog ¶
type CommitLog struct { Options // contains filtered or unexported fields }
func (*CommitLog) NewestOffset ¶
func (*CommitLog) OldestOffset ¶
func (*CommitLog) TruncateTo ¶
type DeleteCleaner ¶
type DeleteCleaner struct { Retention struct { Bytes int64 } }
func NewDeleteCleaner ¶
func NewDeleteCleaner(bytes int64) *DeleteCleaner
type MessageSet ¶
type MessageSet []byte
func NewMessageSet ¶
func NewMessageSet(offset uint64, msgs ...Message) MessageSet
func (MessageSet) Offset ¶
func (ms MessageSet) Offset() int64
func (MessageSet) Payload ¶
func (ms MessageSet) Payload() []byte
func (MessageSet) PutOffset ¶
func (ms MessageSet) PutOffset(offset int64)
func (MessageSet) Size ¶
func (ms MessageSet) Size() int32
Click to show internal directories.
Click to hide internal directories.