Documentation
ΒΆ
Index ΒΆ
- type MDBStore
- func (m *MDBStore) Close() error
- func (m *MDBStore) DeleteRange(minIdx, maxIdx uint64) error
- func (m *MDBStore) FirstIndex() (uint64, error)
- func (m *MDBStore) Get(key []byte) ([]byte, error)
- func (m *MDBStore) GetLog(index uint64, logOut *raft.Log) error
- func (m *MDBStore) GetUint64(key []byte) (v64 uint64, err error)
- func (m *MDBStore) LastIndex() (uint64, error)
- func (m *MDBStore) Set(key, val []byte) error
- func (m *MDBStore) SetUint64(key []byte, val uint64) error
- func (m *MDBStore) StoreLog(log *raft.Log) error
- func (m *MDBStore) StoreLogs(logs []*raft.Log) error
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type MDBStore ΒΆ
type MDBStore struct {
// Determines how frequently the MDBStore will check for stale readers.
// ReaderCheck is guaranteed to be called between any two updates more than
// ReaderCheckPeriod apart. If ReaderCheckPeriod is the MDBStore will only
// check for stale readers while initializing. ReaderCheckPeriod only
// needs to be non-zero if other applications read from the backing
// database concurrently.
ReaderCheckPeriod time.Duration
// contains filtered or unexported fields
}
MDBStore provides an implementation of LogStore and StableStore, all backed by a single MDB database.
func NewMDBStore ΒΆ
NewMDBStore returns a new MDBStore and potential error. Requres a base directory from which to operate. Uses the default maximum size.
func NewMDBStoreWithSize ΒΆ
NewMDBStoreWithSize returns a new MDBStore and potential error. Requres a base directory from which to operate, and a maximum size. If maxSize is not 0, a default value is used.
func (*MDBStore) DeleteRange ΒΆ
DeleteRange deletes a range of log entries. The range is inclusive.
func (*MDBStore) FirstIndex ΒΆ
FirstIndex returns the first index in the MDBStore
Click to show internal directories.
Click to hide internal directories.
