Documentation ¶
Index ¶
- Constants
- type Fsm
- type KVStore
- type Peer
- func (p *Peer) DelByNode(node string) int
- func (p *Peer) GenPeersFile(file string) error
- func (p *Peer) GetLeader() (addr, id string)
- func (p *Peer) IsApplyRight() bool
- func (p *Peer) Join(nodeId, addr string) error
- func (p *Peer) Leave(nodeId string) error
- func (p *Peer) Lookup(key string) []string
- func (p *Peer) Propose(msg *message.Message) error
- func (p *Peer) Status() ([]byte, error)
- func (p *Peer) Stop()
Constants ¶
View Source
const ( // DefaultRaftTimeout is used to apply I/O deadlines. For InstallSnapshot, we multiply // DefaultRaftTimeout by (SnapshotSize / TimeoutScale). DefaultRaftTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
func (*Peer) GenPeersFile ¶
func (*Peer) IsApplyRight ¶
Click to show internal directories.
Click to hide internal directories.