Documentation ¶
Overview ¶
Package campaign encapsulates the state of a campaign.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State int
State describes the state of a campaign as its relates to the caller's leadership.
const ( // Follower indicates the caller has called Campaign but has not yet been // elected. Follower State = iota // Leader indicates the caller has called Campaign and was elected. Leader // Error indicates the call to Campaign returned an error. Error // Closed indicates the campaign has been closed. Closed )
type Status ¶
Status encapsulates campaign state and any error encountered to provide a consistent type for the campaign watch.
func NewErrorStatus ¶
NewErrorStatus returns an error Status with the given State.
Click to show internal directories.
Click to hide internal directories.