Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
FSM implements a finite state machine that is used along with Raft to provide strong consistency. We implement this outside the Server to avoid exposing this outside the package.
func (*FSM) Restore ¶
func (c *FSM) Restore(old io.ReadCloser) error
Restore streams in the snapshot and replaces the current state store with a new one based on the snapshot if all goes OK during the restore.
func (*FSM) State ¶
func (c *FSM) State() *HostMembership
State is used to return a handle to the current state
type HostMember ¶
type HostMembership ¶
type HostMembership struct { Ver string `json:"ver"` Members []HostMember `json:"members"` }
func (*HostMembership) Clone ¶
func (h *HostMembership) Clone() *HostMembership
func (*HostMembership) Decode ¶
func (h *HostMembership) Decode(r io.Reader) (*HostMembership, error)
Click to show internal directories.
Click to hide internal directories.