etcd

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: 24 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 an etcd/raft.Node and implements relab/raft.Raft and etcd/rafthttp.Raft.

func NewRaft

func NewRaft(logger logrus.FieldLogger,
	sm raft.StateMachine, storage *etcdraft.MemoryStorage, wal *wal.WAL, cfg *etcdraft.Config,
	peers []etcdraft.Peer, heartbeat time.Duration,
	single bool, servers []string,
	lat *raft.Latency, event *raft.Event,
	leaderOut chan struct{},
) *Wrapper

func (*Wrapper) Handler

func (w *Wrapper) Handler() http.Handler

func (*Wrapper) IsIDRemoved

func (w *Wrapper) IsIDRemoved(id uint64) bool

func (*Wrapper) Process

func (w *Wrapper) Process(ctx context.Context, m raftpb.Message) error

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

func (w *Wrapper) ReportSnapshot(id uint64, status etcdraft.SnapshotStatus)

func (*Wrapper) ReportUnreachable

func (w *Wrapper) ReportUnreachable(id uint64)

Jump to

Keyboard shortcuts

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