Documentation ¶
Index ¶
- Variables
- type Cluster
- type RPCServer
- type Raft
- func (r *Raft) AddPeer(peer string) error
- func (r *Raft) Apply(b []byte) error
- func (r *Raft) Close() error
- func (r *Raft) IsLeader() bool
- func (r *Raft) Leader() string
- func (r *Raft) LeaderCh() <-chan interface{}
- func (r *Raft) Peers() ([]string, error)
- func (r *Raft) RemovePeer(peer string) error
- func (r *Raft) SetPeers(peers []string) error
- func (r *Raft) ShutdownCh() <-chan struct{}
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultRaftPort = "2380"
)
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func (*Cluster) KVStore ¶
func (c *Cluster) KVStore() libkvstore.Store
func (*Cluster) ShutdownCh ¶
func (c *Cluster) ShutdownCh() <-chan struct{}
type RPCServer ¶
RPCServer handles routing from an an incoming conneciton to a specified backend. These backends are determined based on the 1st byte read from the incoming connection
type Raft ¶
type Raft struct {
// contains filtered or unexported fields
}
func (*Raft) RemovePeer ¶
func (*Raft) ShutdownCh ¶
func (r *Raft) ShutdownCh() <-chan struct{}
Click to show internal directories.
Click to hide internal directories.