Versions in this module Expand all Collapse all v0 v0.8.3 Oct 9, 2017 Changes in this version + var ErrDuplicateRaftId = x.Errorf("Node is already part of group") + var ErrUnhealthyConnection = fmt.Errorf("Unhealthy connection") + type Node struct + Applied x.WaterMark + Cfg *raft.Config + Id uint64 + MyAddr string + RaftContext *protos.RaftContext + RequestCh chan linReadReq + Store *raft.MemoryStorage + Wal *raftwal.Wal + func NewNode(rc *protos.RaftContext) *Node + func (n *Node) AddToCluster(ctx context.Context, pid uint64) error + func (n *Node) BatchAndSendMessages() + func (n *Node) ConfState() *raftpb.ConfState + func (n *Node) Connect(pid uint64, addr string) + func (n *Node) InitFromWal(wal *raftwal.Wal) (idx uint64, restart bool, rerr error) + func (n *Node) Peer(pid uint64) (string, bool) + func (n *Node) Raft() raft.Node + func (n *Node) ReadIndex(ctx context.Context) (chan uint64, error) + func (n *Node) RunReadIndexLoop(closer *y.Closer, readStateCh <-chan raft.ReadState) + func (n *Node) SaveToStorage(s raftpb.Snapshot, h raftpb.HardState, es []raftpb.Entry) + func (n *Node) Send(m raftpb.Message) + func (n *Node) SetConfState(cs *raftpb.ConfState) + func (n *Node) SetPeer(pid uint64, addr string) + func (n *Node) SetRaft(r raft.Node) + func (n *Node) WaitLinearizableRead(ctx context.Context) error type Pool + func (p *Pool) IsHealthy() bool + func (p *Pool) MonitorHealth() + type RaftServer struct + Node *Node + func (w *RaftServer) Echo(ctx context.Context, in *protos.Payload) (*protos.Payload, error) + func (w *RaftServer) GetNode() *Node + func (w *RaftServer) JoinCluster(ctx context.Context, rc *protos.RaftContext) (*protos.Payload, error) + func (w *RaftServer) RaftMessage(ctx context.Context, query *protos.Payload) (*protos.Payload, error) v0.8.2 Sep 20, 2017 Changes in this version + var ErrNoConnection = fmt.Errorf("No connection exists") + func TestConnection(p *Pool) error + type Pool struct + Addr string + func NewPool(addr string) (*Pool, error) + func (p *Pool) AddOwner() + func (p *Pool) Get() *grpc.ClientConn + type Pools struct + func Get() *Pools + func (p *Pools) Any() (*Pool, error) + func (p *Pools) Connect(addr string) *Pool + func (p *Pools) Get(addr string) (*Pool, error) + func (p *Pools) Release(pl *Pool)