Documentation ¶
Index ¶
- func NewLogBoltDbStorage(conf config.Config) (raft.LogStore, error)
- func NewLogFlyDbStorage(conf config.Config) (raft.LogStore, error)
- func NewLogInMemStorage(conf config.Config) (raft.LogStore, error)
- func NewLogRocksDbStorage(conf config.Config) (raft.LogStore, error)
- type BoltDbStore
- func (ds *BoltDbStore) DeleteRange(min, max uint64) error
- func (ds *BoltDbStore) FirstIndex() (uint64, error)
- func (ds *BoltDbStore) GetLog(index uint64, log *raft.Log) error
- func (ds *BoltDbStore) LastIndex() (uint64, error)
- func (ds *BoltDbStore) StoreLog(log *raft.Log) error
- func (ds *BoltDbStore) StoreLogs(logs []*raft.Log) error
- type FlyDbStore
- func (fds *FlyDbStore) DeleteRange(min, max uint64) error
- func (fds *FlyDbStore) FirstIndex() (uint64, error)
- func (fds *FlyDbStore) GetLog(index uint64, log *raft.Log) error
- func (fds *FlyDbStore) LastIndex() (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) GetLog(index uint64, log *raft.Log) error
- func (ds *InMemStore) LastIndex() (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) GetLog(index uint64, log *raft.Log) error
- func (rds *RocksDbStore) LastIndex() (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 ¶
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
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) LastIndex ¶
func (ds *BoltDbStore) LastIndex() (uint64, error)
LastIndex is a method on BoltDbStore that returns the last index in the log
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) 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) LastIndex ¶
func (fds *FlyDbStore) LastIndex() (uint64, error)
LastIndex is a method on FlyDbStore that returns the last index in the log
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) LastIndex ¶
func (ds *InMemStore) LastIndex() (uint64, error)
LastIndex is a method on InMemStore that returns the last index in the log
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) LastIndex ¶
func (rds *RocksDbStore) LastIndex() (uint64, error)
LastIndex is a method on RocksDbStore that returns the last index in the log