Search documentation of macula

# macula_cluster_strategy (macula v0.44.2)

View Source

Macula Cluster Strategy for libcluster.

This module implements a cluster formation strategy using Macula's decentralized discovery (DHT/mDNS) instead of EPMD. It can be used with libcluster in Elixir or standalone in Erlang.

Integration: Works with libcluster (Elixir) or standalone (Erlang).

Discovery Modes: mdns - Local network discovery via mDNS (no bootstrap needed) dht - Internet-scale discovery via Macula DHT both - Try mDNS first, fall back to DHT

Configuration: topology, realm, discovery_type

# Summary

## Functions

list_connected(NameOrPid)

List currently connected nodes.

start_link(Opts)

Start the cluster strategy with options.

start_link(Name, Opts)

Start the cluster strategy with name and options.

stop(NameOrPid)

Stop the cluster strategy.

# Functions

# list_connected(NameOrPid)

    -spec list_connected(atom() | pid()) -> [atom()].

List currently connected nodes.

# start_link(Opts)

    -spec start_link(map()) -> {ok, pid()} | {error, term()}.

Start the cluster strategy with options.

# start_link(Name, Opts)

    -spec start_link(atom(), map()) -> {ok, pid()} | {error, term()}.

Start the cluster strategy with name and options.

# stop(NameOrPid)

    -spec stop(atom() | pid()) -> ok.

Stop the cluster strategy.