Documentation ¶
Index ¶
- func NewFSM(opts FSMOpts) raft.FSM
- type FSM
- type FSMOpts
- type Opts
- type Raft
- func (r *Raft) AddVoter(id raft.ServerID, address raft.ServerAddress, prevIndex uint64, ...) error
- func (r *Raft) Apply(cmd []byte, timeout time.Duration) raft.ApplyFuture
- func (r *Raft) HasJoinedCluster() bool
- func (r *Raft) IsRaftLeader() bool
- func (r *Raft) RaftInit(ctx context.Context)
- func (r *Raft) RaftShutdown()
- func (r *Raft) RemoveServer(meta memberlist.NodeMeta) error
- func (r *Raft) TakeSnapshot() error
- type Snapshot
- type SnapshotOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
type FSMOpts ¶
type FSMOpts struct { Config config.Config EchoVault types.EchoVault GetState func() map[string]internal.KeyData GetCommand func(command string) (types.Command, error) DeleteKey func(ctx context.Context, key string) error StartSnapshot func() FinishSnapshot func() SetLatestSnapshotTime func(msec int64) }
type Opts ¶
type Opts struct { Config config.Config EchoVault types.EchoVault GetState func() map[string]internal.KeyData GetCommand func(command string) (types.Command, error) DeleteKey func(ctx context.Context, key string) error StartSnapshot func() FinishSnapshot func() SetLatestSnapshotTime func(msec int64) }
type Raft ¶
type Raft struct {
// contains filtered or unexported fields
}
func (*Raft) HasJoinedCluster ¶
func (*Raft) IsRaftLeader ¶
func (*Raft) RaftShutdown ¶
func (r *Raft) RaftShutdown()
func (*Raft) RemoveServer ¶
func (r *Raft) RemoveServer(meta memberlist.NodeMeta) error
func (*Raft) TakeSnapshot ¶
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func NewFSMSnapshot ¶
func NewFSMSnapshot(opts SnapshotOpts) *Snapshot
type SnapshotOpts ¶
type SnapshotOpts struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.