Beacon.LiveAdmin.Cluster (Beacon LiveAdmin v0.4.2)

View Source

Cluster management. Discover all sites running in the cluster and executes functions globally.

Summary

Functions

Calls a function for a running site in the cluster.

Returns a list of sites running in all connected nodes in the cluster.

Functions

call(site, mod, fun, args)

@spec call(atom(), module(), fun :: (-> any()), [any()]) :: any()

Calls a function for a running site in the cluster.

It will call the function in only one of the available nodes to avoid double execution of fun.

Examples

iex> Beacon.LiveAdmin.Cluster.call(:my_site, Beacon, :boot, [:my_site])
:ok

running_sites()

Returns a list of sites running in all connected nodes in the cluster.

It doesn't try to refresh the list of running sites, it only returns the results cached when calling discover_sites/0.