miniwal

package module
v0.0.0-...-e92240a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 11 Imported by: 0

README

miniwal

Todo:Fix doc and comment

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	// contains filtered or unexported fields
}

func (*LogEntry) Index

func (e *LogEntry) Index() uint64

func (*LogEntry) ReadToNext

func (e *LogEntry) ReadToNext(w io.Writer) (*LogEntry, error)

func (*LogEntry) Seek

func (e *LogEntry) Seek(toIndex uint64) (*LogEntry, error)

type LogError

type LogError struct {
	// contains filtered or unexported fields
}

func (LogError) Error

func (e LogError) Error() string

type LogFile

type LogFile struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*LogFile, error)

func (*LogFile) Close

func (l *LogFile) Close() error

func (*LogFile) Compact

func (l *LogFile) Compact(newStartIndex uint64) error

func (*LogFile) FirstEntry

func (l *LogFile) FirstEntry() (*LogEntry, error)

func (*LogFile) FirstIndex

func (l *LogFile) FirstIndex() uint64

func (*LogFile) Flush

func (l *LogFile) Flush() error

func (*LogFile) Iter

func (l *LogFile) Iter(start, end uint64) (*LogIterator, error)

func (*LogFile) LastIndex

func (l *LogFile) LastIndex() uint64

func (*LogFile) Restart

func (l *LogFile) Restart(startingIndex uint64) error

func (*LogFile) Seek

func (l *LogFile) Seek(toIndex uint64) (*LogEntry, error)

func (*LogFile) Write

func (l *LogFile) Write(entry []byte) error

type LogIterator

type LogIterator struct {
	// contains filtered or unexported fields
}

func (*LogIterator) Entry

func (i *LogIterator) Entry() *LogEntry

func (*LogIterator) Next

func (i *LogIterator) Next() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL