Bedrock.ControlPlane.Config (bedrock v0.5.2)

View Source

A Config is a data structure that describes the configuration of the control plane. It contains the current state of the cluster, the parameters that are used to configure the cluster, and the policies that are used to configure the cluster.

Summary

Types

t()

Struct representing the control plane configuration.

Functions

Returns true if the cluster will allow volunteer nodes to join.

Returns the nodes that are part of the cluster.

Creates a new Config struct.

Returns the ping rate in milliseconds.

Types

state()

@type state() :: :uninitialized | :recovery | :running | :stopping

t()

@type t() :: %{
  optional(:recovery_attempt) =>
    Bedrock.ControlPlane.Config.RecoveryAttempt.t(),
  coordinators: [node()],
  parameters: Bedrock.ControlPlane.Config.Parameters.t() | nil,
  policies: Bedrock.ControlPlane.Config.Policies.t() | nil
}

Struct representing the control plane configuration.

Fields

  • coordinators - The coordinators of the cluster.
  • parameters - The parameters that are used to configure the cluster.
  • policies - The policies that are used to configure the cluster.

Functions

allow_volunteer_nodes_to_join?(t)

@spec allow_volunteer_nodes_to_join?(t()) :: boolean()

Returns true if the cluster will allow volunteer nodes to join.

coordinators(t)

@spec coordinators(t()) :: [node()]

Returns the nodes that are part of the cluster.

key_range(min_key, max_key_exclusive)

@spec key_range(min_key :: Bedrock.key(), max_key_exclusive :: Bedrock.key()) ::
  Bedrock.key_range()

new(coordinators)

@spec new(coordinators :: [node()]) :: t()

Creates a new Config struct.

ping_rate_in_ms(t)

@spec ping_rate_in_ms(t()) :: pos_integer()

Returns the ping rate in milliseconds.