Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyResponse ¶
type ApplyResponse struct { Error error Data interface{} }
ApplyResponse response from Apply raft
type ArimaFSM ¶
type ArimaFSM struct {
Conn *badger.DB
}
func NewArimaFSM ¶
func (*ArimaFSM) Apply ¶
Apply log is invoked once a log entry is committed. It returns a value which will be made available in the ApplyFuture returned by Raft.Apply method if that method was called on the same Raft node as the FSM.
type ArimaSnapshot ¶
type ArimaSnapshot struct {
Conn *badger.DB
}
func (*ArimaSnapshot) Persist ¶
func (snap *ArimaSnapshot) Persist(sink raft.SnapshotSink) error
Persist should dump all necessary state to the WriteCloser 'sink', and call sink.Close() when finished or call sink.Cancel() on error.
func (*ArimaSnapshot) Release ¶
func (snap *ArimaSnapshot) Release()
Release is invoked when we are finished with the snapshot.
type CommandPayload ¶
CommandPayload is payload sent by system when calling raft.Apply(cmd []byte, timeout time.Duration)
Click to show internal directories.
Click to hide internal directories.