Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingQID = errors.New("invalid quorum configuration: quorum id is required") ErrNoPeers = errors.New("invalid quorum configuration: no peers assigned to quorum") ErrUniquePID = errors.New("invalid quorum configuration: peer ids must be unique") ErrMissingPID = errors.New("invalid peer configuration: peer id is required") ErrPeerMissingField = errors.New("invalid peer configuration: name, bind_addr, and endpoint are required") )
Validation Errors
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct { PID uint32 `json:"peer_id" yaml:"peer_id"` // the unique ID of the peer in the system Name string `json:"name" yaml:"name"` // a human readable name for the peer (e.g. hostname) BindAddr string `json:"bind_addr" yaml:"bind_addr"` // the address to bind the peer on to listen for requests Endpoint string `json:"endpoint" yaml:"endpoint"` // the domain or ip address and port to connect to the peer on }
Peer is a configuration of a peer and contains all connection and helper information.
type Quorum ¶
type Quorum struct { QID uint32 `json:"quorum_id" yaml:"quorum_id"` // the unique ID of the quorum of peers BootstrapLeader uint32 `json:"boostrap_leader,omitempty" yaml:"bootstrap_leader,omitempty"` // the PID of the leader to bootstrap at term 0 Peers []*Peer `json:"peers" yaml:"peers"` // the peers that are in the quorum }
Quorum represents the configuration of a quorum on disk.
Click to show internal directories.
Click to hide internal directories.