Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Component = &component.Component{ Name: "cluster.election", Dependencies: component.Components{ runner.Component, election.Component, }, Init: component.StepFunc(func(container container.Container) error { return container.Provide(NewElection) }), Execute: component.StepFunc(func(container container.Container) error { return container.Invoke(func(m cluster.Manager, e *Election) { m.OnAddPeer().Subscribe(e.onAddPeer) m.OnDeletingPeer().Subscribe(e.onDeletingPeer) m.OnMasterDisconnection().Subscribe(e.onMasterDisconnection) m.OnMasterCandidateConnect().Subscribe(e.onMasterCandidateConnect) m.OnChangeMaster().Subscribe(e.onChangeMaster) }) }), }
Functions ¶
This section is empty.
Types ¶
type Election ¶
type Election struct {
// contains filtered or unexported fields
}
func NewElection ¶
Click to show internal directories.
Click to hide internal directories.