hashicorp

package
v0.0.0-...-dd5fc89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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) Apply

func (w *Wrapper) Apply(logentry *hraft.Log) interface{}

func (*Wrapper) ProposeCmd

func (w *Wrapper) ProposeCmd(ctx context.Context, req []byte) (raft.Future, error)

func (*Wrapper) ProposeConf

func (w *Wrapper) ProposeConf(ctx context.Context, req *commonpb.ReconfRequest) (raft.Future, error)

func (*Wrapper) ReadCmd

func (w *Wrapper) ReadCmd(context.Context, []byte) (raft.Future, error)

func (*Wrapper) Restore

func (w *Wrapper) Restore(io.ReadCloser) error

func (*Wrapper) Snapshot

func (w *Wrapper) Snapshot() (hraft.FSMSnapshot, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL