Documentation ¶
Index ¶
- type BoltDbStore
- func (ds *BoltDbStore) DeleteRange(min, max uint64) error
- func (ds *BoltDbStore) FirstIndex() (uint64, error)
- func (ds *BoltDbStore) Get(key []byte) ([]byte, error)
- func (ds *BoltDbStore) GetLog(index uint64, log *raft.Log) error
- func (ds *BoltDbStore) GetUint64(key []byte) (uint64, error)
- func (ds *BoltDbStore) LastIndex() (uint64, error)
- func (ds *BoltDbStore) Set(key []byte, val []byte) error
- func (ds *BoltDbStore) SetUint64(key []byte, val uint64) error
- func (ds *BoltDbStore) StoreLog(log *raft.Log) error
- func (ds *BoltDbStore) StoreLogs(logs []*raft.Log) error
- type DataStore
- type FlyDbStore
- func (fds *FlyDbStore) DeleteRange(min, max uint64) error
- func (fds *FlyDbStore) FirstIndex() (uint64, error)
- func (fds *FlyDbStore) Get(key []byte) ([]byte, error)
- func (fds *FlyDbStore) GetLog(index uint64, log *raft.Log) error
- func (fds *FlyDbStore) GetUint64(key []byte) (uint64, error)
- func (fds *FlyDbStore) LastIndex() (uint64, error)
- func (fds *FlyDbStore) Set(key []byte, val []byte) error
- func (fds *FlyDbStore) SetUint64(key []byte, val uint64) error
- func (fds *FlyDbStore) StoreLog(log *raft.Log) error
- func (fds *FlyDbStore) StoreLogs(logs []*raft.Log) error
- type InMemStore
- func (ds *InMemStore) DeleteRange(min, max uint64) error
- func (ds *InMemStore) FirstIndex() (uint64, error)
- func (ds *InMemStore) Get(key []byte) ([]byte, error)
- func (ds *InMemStore) GetLog(index uint64, log *raft.Log) error
- func (ds *InMemStore) GetUint64(key []byte) (uint64, error)
- func (ds *InMemStore) LastIndex() (uint64, error)
- func (ds *InMemStore) Set(key []byte, val []byte) error
- func (ds *InMemStore) SetUint64(key []byte, val uint64) error
- func (ds *InMemStore) StoreLog(log *raft.Log) error
- func (ds *InMemStore) StoreLogs(logs []*raft.Log) error
- type RocksDbStore
- func (rds *RocksDbStore) DeleteRange(min, max uint64) error
- func (rds *RocksDbStore) FirstIndex() (uint64, error)
- func (rds *RocksDbStore) Get(key []byte) ([]byte, error)
- func (rds *RocksDbStore) GetLog(index uint64, log *raft.Log) error
- func (rds *RocksDbStore) GetUint64(key []byte) (uint64, error)
- func (rds *RocksDbStore) LastIndex() (uint64, error)
- func (rds *RocksDbStore) Set(key []byte, val []byte) error
- func (rds *RocksDbStore) SetUint64(key []byte, val uint64) error
- func (rds *RocksDbStore) StoreLog(log *raft.Log) error
- func (rds *RocksDbStore) StoreLogs(logs []*raft.Log) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltDbStore ¶
type BoltDbStore struct {
// contains filtered or unexported fields
}
BoltDbStore is a struct that implements the raft.LogStore interface It uses BoltDB as the underlying storage and a read-write mutex for concurrency control
func (*BoltDbStore) DeleteRange ¶
func (ds *BoltDbStore) DeleteRange(min, max uint64) error
DeleteRange is a method on BoltDbStore that deletes a range of log entries
func (*BoltDbStore) FirstIndex ¶
func (ds *BoltDbStore) FirstIndex() (uint64, error)
FirstIndex is a method on BoltDbStore that returns the first index in the log
func (*BoltDbStore) GetLog ¶
func (ds *BoltDbStore) GetLog(index uint64, log *raft.Log) error
GetLog is a method on BoltDbStore that retrieves a log entry by its index
func (*BoltDbStore) GetUint64 ¶ added in v1.0.9
func (ds *BoltDbStore) GetUint64(key []byte) (uint64, error)
func (*BoltDbStore) LastIndex ¶
func (ds *BoltDbStore) LastIndex() (uint64, error)
LastIndex is a method on BoltDbStore that returns the last index in the log
func (*BoltDbStore) SetUint64 ¶ added in v1.0.9
func (ds *BoltDbStore) SetUint64(key []byte, val uint64) error
type DataStore ¶ added in v1.0.9
type DataStore interface { raft.LogStore raft.StableStore }
func NewLogBoltDbStorage ¶
NewLogBoltDbStorage is a function that creates a new BoltDB store It takes a configuration map as input and returns a raft.LogStore and an error
func NewLogFlyDbStorage ¶
NewLogFlyDbStorage is a function that creates a new FlyDB store It takes a configuration map as input and returns a raft.LogStore and an error
func NewLogInMemStorage ¶
NewLogInMemStorage is a function that creates a new in-memory store It returns a raft.LogStore and an error
type FlyDbStore ¶
type FlyDbStore struct {
// contains filtered or unexported fields
}
FlyDbStore is a struct that implements the raft.LogStore interface It uses FlyDB as the underlying storage and a read-write mutex for concurrency control
func (*FlyDbStore) DeleteRange ¶
func (fds *FlyDbStore) DeleteRange(min, max uint64) error
DeleteRange is a method on FlyDbStore that deletes a range of log entries
func (*FlyDbStore) FirstIndex ¶
func (fds *FlyDbStore) FirstIndex() (uint64, error)
FirstIndex is a method on FlyDbStore that returns the first index in the log
func (*FlyDbStore) Get ¶ added in v1.0.9
func (fds *FlyDbStore) Get(key []byte) ([]byte, error)
Get retrieves the value associated with `key`; returns []byte if key exists
func (*FlyDbStore) GetLog ¶
func (fds *FlyDbStore) GetLog(index uint64, log *raft.Log) error
GetLog is a method on FlyDbStore that retrieves a log entry by its index
func (*FlyDbStore) GetUint64 ¶ added in v1.0.9
func (fds *FlyDbStore) GetUint64(key []byte) (uint64, error)
GetUint64 is used to retrieve the Uint64 value of `key`
func (*FlyDbStore) LastIndex ¶
func (fds *FlyDbStore) LastIndex() (uint64, error)
LastIndex is a method on FlyDbStore that returns the last index in the log
func (*FlyDbStore) Set ¶ added in v1.0.9
func (fds *FlyDbStore) Set(key []byte, val []byte) error
Set is used to store key/value pair
func (*FlyDbStore) SetUint64 ¶ added in v1.0.9
func (fds *FlyDbStore) SetUint64(key []byte, val uint64) error
SetUint64 is used to set Uint64 value for `key`
type InMemStore ¶
type InMemStore struct {
// contains filtered or unexported fields
}
InMemStore is a struct that implements the raft.LogStore interface It uses a map as the underlying storage and a read-write mutex for concurrency control
func (*InMemStore) DeleteRange ¶
func (ds *InMemStore) DeleteRange(min, max uint64) error
DeleteRange is a method on InMemStore that deletes a range of log entries
func (*InMemStore) FirstIndex ¶
func (ds *InMemStore) FirstIndex() (uint64, error)
FirstIndex is a method on InMemStore that returns the first index in the log
func (*InMemStore) GetLog ¶
func (ds *InMemStore) GetLog(index uint64, log *raft.Log) error
GetLog is a method on InMemStore that retrieves a log entry by its index
func (*InMemStore) GetUint64 ¶ added in v1.0.9
func (ds *InMemStore) GetUint64(key []byte) (uint64, error)
func (*InMemStore) LastIndex ¶
func (ds *InMemStore) LastIndex() (uint64, error)
LastIndex is a method on InMemStore that returns the last index in the log
func (*InMemStore) SetUint64 ¶ added in v1.0.9
func (ds *InMemStore) SetUint64(key []byte, val uint64) error
type RocksDbStore ¶
type RocksDbStore struct {
// contains filtered or unexported fields
}
RocksDbStore is a struct that implements the raft.LogStore interface It uses BoltDB as the underlying storage and a read-write mutex for concurrency control
func (*RocksDbStore) DeleteRange ¶
func (rds *RocksDbStore) DeleteRange(min, max uint64) error
DeleteRange is a method on RocksDbStore that deletes a range of log entries
func (*RocksDbStore) FirstIndex ¶
func (rds *RocksDbStore) FirstIndex() (uint64, error)
FirstIndex is a method on RocksDbStore that returns the first index in the log
func (*RocksDbStore) GetLog ¶
func (rds *RocksDbStore) GetLog(index uint64, log *raft.Log) error
GetLog is a method on RocksDbStore that retrieves a log entry by its index
func (*RocksDbStore) GetUint64 ¶ added in v1.0.9
func (rds *RocksDbStore) GetUint64(key []byte) (uint64, error)
func (*RocksDbStore) LastIndex ¶
func (rds *RocksDbStore) LastIndex() (uint64, error)
LastIndex is a method on RocksDbStore that returns the last index in the log
func (*RocksDbStore) Set ¶ added in v1.0.9
func (rds *RocksDbStore) Set(key []byte, val []byte) error
func (*RocksDbStore) SetUint64 ¶ added in v1.0.9
func (rds *RocksDbStore) SetUint64(key []byte, val uint64) error