Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFollower ¶
func NewFollower() leadership.State
func NewLeader ¶
func NewLeader() leadership.State
func NewUnavailable ¶
func NewUnavailable() leadership.State
Types ¶
type Follower ¶
type Follower struct {
Base
}
func (*Follower) OnEnterState ¶
func (s *Follower) OnEnterState(ctx context.Context, c leadership.Candidate, previousState leadership.State)
type Leader ¶
type Leader struct {
Base
}
func (*Leader) OnEnterState ¶
func (s *Leader) OnEnterState(ctx context.Context, c leadership.Candidate, previousState leadership.State)
type Unavailable ¶
type Unavailable struct {
}Concrete state implementations
func (*Unavailable) DoWork ¶
func (s *Unavailable) DoWork(ctx context.Context, c leadership.Candidate)
func (*Unavailable) OnEnterState ¶
func (s *Unavailable) OnEnterState(ctx context.Context, c leadership.Candidate, previousState leadership.State)
Click to show internal directories.
Click to hide internal directories.