Documentation ¶
Index ¶
- Constants
- type Fsm
- func (f *Fsm) Apply(l *raft.Log) interface{}
- func (f *Fsm) DelByNode(node string) int
- func (f *Fsm) Lookup(key string) []string
- func (f *Fsm) Persist(sink raft.SnapshotSink) error
- func (f *Fsm) Release()
- func (f *Fsm) Restore(ir io.ReadCloser) error
- func (f *Fsm) Snapshot() (raft.FSMSnapshot, error)
- 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.