Documentation ¶
Index ¶
- Constants
- func InitPath(dir string) error
- func IsLogError(err error) bool
- func NewLogError(filename string, offset int64, reason string) *logError
- type Entry
- type RecordReadAt
- type Recorder
- type Snapshot
- type Wal
- func (w *Wal) ApplySnapshot(st Snapshot) error
- func (w *Wal) Close()
- func (w *Wal) Entries(lo, hi uint64, maxSize uint64) (entries []pb.Entry, err error)
- func (w *Wal) FirstIndex() uint64
- func (w *Wal) InitialState() pb.HardState
- func (w *Wal) LastIndex() uint64
- func (w *Wal) SaveEntries(entries []pb.Entry) error
- func (w *Wal) SaveHardState(hs pb.HardState) error
- func (w *Wal) Sync() error
- func (w *Wal) Term(index uint64) (term uint64, err error)
- func (w *Wal) Truncate(index uint64) error
Constants ¶
View Source
const ( EntryType recordType = iota + 1 IndexType )
View Source
const (
TrashPath = ".trash"
)
Variables ¶
This section is empty.
Functions ¶
func IsLogError ¶
func NewLogError ¶
NewCorruptError new
Types ¶
type RecordReadAt ¶
type Wal ¶
type Wal struct {
// contains filtered or unexported fields
}
Storage the storage
func (*Wal) ApplySnapshot ¶
func (*Wal) FirstIndex ¶
func (*Wal) InitialState ¶
Click to show internal directories.
Click to hide internal directories.