Documentation ¶
Index ¶
- type BoltStore
- func (d *BoltStore) All(to interface{}, limit int, skip int, reverse bool) error
- func (d *BoltStore) Apply(l *raft.Log) interface{}
- func (d *BoltStore) BroadcastFrom(index uint64)
- func (d *BoltStore) Close() error
- func (d *BoltStore) Find(field string, value interface{}, to interface{}, limit int, skip int, ...) error
- func (d *BoltStore) One(fieldName string, value interface{}, to interface{}) error
- func (d *BoltStore) ProcessLogEntry(entry *database.LogEntry) error
- func (d *BoltStore) RegisterListener(listener database.Listener)
- func (d *BoltStore) Restore(source io.ReadCloser) error
- func (d *BoltStore) Snapshot() (raft.FSMSnapshot, error)
- func (d *BoltStore) Storm() *storm.DB
- func (d *BoltStore) WriteTo(w io.Writer) (int64, error)
- type Snapshot
- type TestStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
BoltStore is the lowest level of the gansoi database, it represent the on-disk database. BoltStore implements raft.FSM and database.Reader.
func NewBoltStore ¶
NewBoltStore will instantiate a new BoltStore. path will be created if it doesn't exist.
func (*BoltStore) BroadcastFrom ¶
BroadcastFrom will set a broadcast "epoch". Raft logs before this epoch will not trigger a PostApply() broadcast. If this is never called nothing will be broadcast.
func (*BoltStore) Close ¶
Close will close the database. Accessing the database after this will result in a deadlock.
func (*BoltStore) Find ¶
func (d *BoltStore) Find(field string, value interface{}, to interface{}, limit int, skip int, reverse bool) error
Find Find returns one or more records by the specified index.
func (*BoltStore) ProcessLogEntry ¶
ProcessLogEntry will process the log entry and apply whatever needs doing.
func (*BoltStore) RegisterListener ¶
RegisterListener implements database.Database.
func (*BoltStore) Restore ¶
func (d *BoltStore) Restore(source io.ReadCloser) error
Restore implements raft.FSM.
func (*BoltStore) Snapshot ¶
func (d *BoltStore) Snapshot() (raft.FSMSnapshot, error)
Snapshot implements raft.FSM.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot allows raft to retrieve a complete snapshot of the database.
type TestStore ¶
TestStore can be used when testing database functions.
func (*TestStore) RegisterListener ¶
RegisterListener implements database.Broadcaster - but does nothing.