Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidID = errors.New("provided id is not a part of the running cluster") ErrEpochMismatch = errors.New("inconsistency between epoch in id and epoch in epoch vector") )
Functions ¶
This section is empty.
Types ¶
type AReconfHandler ¶
type AReconfHandler struct {
// contains filtered or unexported fields
}
ReplacementHandler represents a Goxos submodule handling the core Asynchronous Reconfiguration protocol. It is responsible for handling startup for replicas joining a Goxos cluster as the result of a replacement. The module is also responsible for initiating replacements based failure indications.
func NewAReconfHandler ¶
func NewAReconfHandler(id grp.ID, conf *config.Config, appID string, grpmgr grp.GroupManager, fd *liveness.Fd, ld liveness.LeaderDetector, bcast chan<- interface{}, ucast chan<- net.Packet, dmx net.Demuxer, asrch chan<- app.StateReq, acceptor paxos.Acceptor, proposer paxos.Proposer, adu *paxos.Adu, stopCheckIn *sync.WaitGroup) *AReconfHandler
NewAReconfHandler returns a new areconfig handler.
func (*AReconfHandler) IsReconfigInProgress ¶
func (rh *AReconfHandler) IsReconfigInProgress() bool
IsReconfigInProgress returns the value uf reconfInProgress.
func (*AReconfHandler) RequestReconf ¶
func (rh *AReconfHandler) RequestReconf(rcmd ReconfCmd) error
RequestReplacement request replacement of the replica specified by rcmd.
func (*AReconfHandler) RunningPaxos ¶
func (rh *AReconfHandler) RunningPaxos()
WaitForActivation blocks until a replica is activated by using the protocol. The method returns immediately if the replica is already activated. This method should be used by a replacer replica during startup.
func (*AReconfHandler) SetReconfigInProgress ¶
func (rh *AReconfHandler) SetReconfigInProgress(inProgress bool)
SetReconfigInProgress is used to indicate that a reconfiguration is being prepared
func (*AReconfHandler) Start ¶
func (rh *AReconfHandler) Start()
Start starts the AReconfHandler by spawning a goroutine to handle incoming and outgoing messages.
type Activation ¶
type Activation struct { Epoch grp.Epoch AduSlot paxos.SlotID AccState *paxos.AcceptorSlotMap Confs map[grp.Epoch]map[grp.ID]grp.Node }
func (Activation) String ¶
func (ac Activation) String() string
type CPromise ¶
type ReconfCmd ¶
type ReconfCmd struct {
// contains filtered or unexported fields
}
ReconfCmd encapsualtes a replacement command.
func NewReconfCmdFromID ¶
NewReconfCmdFromID returns a replacement command for the replica with identifier id.
func NewReconfCmdFromSlice ¶
NewReconfCmdFromSlice returns a replacement command for the replicas specified.