Documentation
¶
Index ¶
- Variables
- func InitDB()
- type LevelDB
- func (level *LevelDB) Close() error
- func (db *LevelDB) PrintLog(fileName string)
- func (level *LevelDB) ReadLog(index int) (*paxos.LogEntry, error)
- func (level *LevelDB) Restore(p *paxos.Proposer, a *paxos.Acceptor, statMachine sm.StatMachine) error
- func (level *LevelDB) WriteLog(index int, entry *paxos.LogEntry) error
- type MyComparator
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorBadLogFormat = errors.New("bad log format")
Functions ¶
Types ¶
type LevelDB ¶
type LevelDB struct {
// contains filtered or unexported fields
}
func NewLevelDB ¶
type MyComparator ¶
type MyComparator struct { }
func (MyComparator) Compare ¶
func (cmp MyComparator) Compare(a, b []byte) int
func (MyComparator) Name ¶
func (cmp MyComparator) Name() string
func (MyComparator) Separator ¶
func (cmp MyComparator) Separator(dst, a, b []byte) []byte
func (MyComparator) Successor ¶
func (cmp MyComparator) Successor(dst, b []byte) []byte
Click to show internal directories.
Click to hide internal directories.