Documentation ¶
Index ¶
- type Wrapper
- func (w *Wrapper) Apply(logentry *hraft.Log) interface{}
- func (w *Wrapper) ProposeCmd(ctx context.Context, req []byte) (raft.Future, error)
- func (w *Wrapper) ProposeConf(ctx context.Context, req *commonpb.ReconfRequest) (raft.Future, error)
- func (w *Wrapper) ReadCmd(context.Context, []byte) (raft.Future, error)
- func (w *Wrapper) Restore(io.ReadCloser) error
- func (w *Wrapper) Snapshot() (hraft.FSMSnapshot, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper wraps a hashicorp/raft.Raft and implements relab/raft.Raft.
func NewRaft ¶
func NewRaft(logger logrus.FieldLogger, sm raft.StateMachine, cfg *hraft.Config, servers []hraft.Server, trans hraft.Transport, logs hraft.LogStore, stable hraft.StableStore, snaps hraft.SnapshotStore, enabled []uint64, lat *raft.Latency, event *raft.Event, leaderOut chan struct{}, id uint64, checkQuorum bool, ) *Wrapper
func (*Wrapper) ProposeCmd ¶
func (*Wrapper) ProposeConf ¶
Click to show internal directories.
Click to hide internal directories.