pub trait Config {
    type Node: Node;
    type Applicable: ApplicableTo<StateOf<Self::Node>> + 'static;
    type RetryPolicy: RetryPolicy<Invocation = InvocationOf<Self::Node>, Error = AppendError<InvocationOf<Self::Node>>, StaticError = AppendError<InvocationOf<Self::Node>>>;

    fn new_leadership_taker(&self) -> Self::Applicable;
    fn retry_policy(&self) -> Self::RetryPolicy;

    fn init(&mut self, node: &Self::Node) { ... }
    fn update(&mut self, event: &EventFor<Self::Node>) { ... }
    fn interval(&self) -> Option<Duration> { ... }
}
Expand description

Ensure leadership configuration.

Required Associated Types

The node type that is decorated.

The applicable that is used to take leadership, usually a no-op.

Type of retry policy to be used.

See retry_policy.

Required Methods

Creates a new value to take leadership.

Creates a retry policy.

Provided Methods

Initializes this configuration.

Updates the configuration with the given event.

Interval after which leadership is taken.

Implementors