Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct {
*raftboltdb.BoltStore
}
Log is an object that can return information about the Raft log.
func New ¶
New returns an instantiated Log object that provides access to the Raft log stored in a BoltDB database. It takes a path to the database file and a boolean flag to enable/disable the freelist sync. If the flag is set to true, the freelist will not be synced to disk, which can improve write performance but may increase the risk of data loss in the event of a crash or power loss. Returns an error if the BoltDB store cannot be created.
func (*Log) GetAppliedIndex ¶
GetAppliedIndex returns the AppliedIndex value.
func (*Log) HasCommand ¶
HasCommand returns whether the Raft log contains any Command log entries.
func (*Log) LastCommandIndex ¶
LastCommandIndex returns the index of the last Command log entry written to the Raft log. Returns an index of zero if no such log exists.
func (*Log) SetAppliedIndex ¶
SetAppliedIndex sets the AppliedIndex value.