ClusterYASD.Strategy (libcluster_yasd v0.1.0) View Source
YASD Strategy for libcluster.
Use this module as strategy in your libcluster topologies.
topologies = [
my_yasd: [
strategy: ClusterYASD.Strategy,
config: [
base_url: "http://yaasd:4001",
application_name: :my_app,
polling_interval: 10, # seconds
register_interval: 30, # seconds
immidiate_register: true
]
]
]
# Other than `base_url` all other configurations are optional.
And finally add it to your supervision tree.
{Cluster.Supervisor, [topologies, [name: MyApp.ClusterSupervisor]]}
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
.