Documentation ¶
Index ¶
- type Cluster
- func (this *Cluster) BroadcastHeartbeat(roleId uint64)
- func (this *Cluster) BroadcastPrepareRequest(request acceptor.PrepareReq) (uint64, <-chan Response)
- func (this *Cluster) BroadcastProposalRequest(request acceptor.ProposalReq, filter map[uint64]bool) (uint64, <-chan Response)
- func (this *Cluster) Connect()
- func (this *Cluster) GetPeerCount() uint64
- func (this *Cluster) GetSkipPromiseCount() uint64
- func (this *Cluster) Listen(handler *rpc.Server) error
- func (this *Cluster) NotifyOfSuccess(roleId uint64, info acceptor.SuccessNotify) <-chan Response
- func (this *Cluster) SetPromiseRequirement(roleId uint64, required bool)
- type Peer
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func ConstructCluster ¶
func (*Cluster) BroadcastHeartbeat ¶
Sends pulse to all nodes in the cluster
func (*Cluster) BroadcastPrepareRequest ¶
func (this *Cluster) BroadcastPrepareRequest(request acceptor.PrepareReq) (uint64, <-chan Response)
Broadcasts a prepare phase request to the cluster
func (*Cluster) BroadcastProposalRequest ¶
func (this *Cluster) BroadcastProposalRequest(request acceptor.ProposalReq, filter map[uint64]bool) (uint64, <-chan Response)
Broadcasts a proposal phase request to the cluster
func (*Cluster) GetPeerCount ¶
Returns number of peers in cluster
func (*Cluster) GetSkipPromiseCount ¶
Returns number of peers from which no promise is required
func (*Cluster) NotifyOfSuccess ¶
func (this *Cluster) NotifyOfSuccess(roleId uint64, info acceptor.SuccessNotify) <-chan Response
Directly notifies a specific node of a chosen value
func (*Cluster) SetPromiseRequirement ¶
Mark whether a promise is required from a node before sending accept requests
Click to show internal directories.
Click to hide internal directories.