libcluster_hcloud v0.1.1 ClusterHcloud.Strategy.Labels View Source

This clustering strategy works by loading all instances of the project matching the given label selector. See the hcloud docs for further details.

All instances must be started with the same app name and have security groups configured to allow inter-node communication.

config :libcluster,
  topologies: [
    labels_example: [
      strategy: Elixir.ClusterHcloud.Strategy.Labels,
      config: [
        hcloud_api_access_token: "xxx",
        label_selector: "mylabel",
        app_prefix: "app",
        private_network_name: "my-network",
        show_debug: false,
        polling_interval: 10_000]]],

Configuration Options

KeyRequiredDescription
:hcloud_api_access_tokenyesAccess token for the hcloud project.
:label_selectoryesLabel selector matching for the servers to be clustered.
:app_prefixnoWill be prepended to the node's IP address to create the node name.
:private_network_namenoAllows to use a specific internal hcloud network to determine the IP address. If not specified, the public IP address will be used.
:polling_intervalnoNumber of milliseconds to wait between polls to the hcloud api. Defaults to 5000.
:show_debugnoTrue or false, whether or not to show the debug log. Defaults to true.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for Cluster.Strategy.start_link/1.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Callback implementation for Cluster.Strategy.start_link/1.