View Source partisan_peer_service (partisan v5.0.0-beta.13)
Link to this section Summary
Functions
Adds a supervised callback to receive peer service membership updates.
Returns the broadcast servers view of full cluster membership. Wait indefinitely for a response is returned from the process.
Returns the broadcast servers view of full cluster membership. Waits
Timeout
ms for a response from the server.cancel exchanges started by this node.
Return peer service connections
Decode peer_service_manager state from an encoded form
return a list of exchanges, started by broadcast on thisnode, that are running.
returns a list of exchanges, started by broadcast on
Node
, that are running.Inject a partition.
Leave the cluster. We will not be able to re-join the cluster, we must be restarted first.
Remove a node from the cluster. Subsequently calling
join (NodeSpec)
will not work for the removed node. The removed node must be restarted first.Return current peer service manager for this
Return cluster members
Return cluster members
Return cluster members
Trigger function on connection close for a given node.
Function
is a function object taking zero or a single argument, where the argument is the Node name.Trigger function on connection open for a given node.
Function
is a function object taking zero or a single argument, where the argument is the Node name.Reserve a slot for the particular tag.
Resolve a partition.
Stop
Stop
Update cluster members.
Link to this section Types
-type channel() :: atom().
-type listen_addr() :: #{ip => inet:ip_address(), port => non_neg_integer()}.
-type node_spec() :: #{name => node(), listen_addrs => [listen_addr()], channels => [channel()], parallelism => non_neg_integer()}.
-type partitions() :: [{reference(), node_spec()}].
-type ttl() :: non_neg_integer().
Link to this section Functions
-spec broadcast_members() -> ordsets:ordset(node()).
-spec broadcast_members(infinity | pos_integer()) -> ordsets:ordset(node()).
Timeout
ms for a response from the server.
-spec cancel_exchanges(partisan_plumtree_broadcast:selector()) -> partisan_plumtree_broadcast:exchanges().
-spec decode(term()) -> term().
-spec exchanges() -> partisan_plumtree_broadcast:exchanges().
-spec exchanges(node()) -> partisan_plumtree_broadcast:exchanges().
Node
, that are running.
-spec get_local_state() -> term().
-spec join(node_spec() | node() | list) -> ok | {error, self_join | any()}.
-spec leave() -> ok.
-spec leave(node_spec()) -> ok.
join (NodeSpec)
will not work for the removed node. The removed node must be restarted first.
-spec manager() -> module().
-spec member(Node :: node() | node_spec()) -> boolean().
-spec members() -> {ok, [node()]}.
-spec members_for_orchestration() -> [node_spec()].
-spec on_down(node() | node_spec() | any | '_', function()) -> ok | {error, not_implemented}.
Function
is a function object taking zero or a single argument, where the argument is the Node name.
-spec on_up(node() | node_spec() | any | '_', function()) -> ok | {error, not_implemented}.
Function
is a function object taking zero or a single argument, where the argument is the Node name.
-spec partitions() -> {ok, partitions()} | {error, not_implemented}.
-spec reserve(atom()) -> ok | {error, no_available_slots}.
-spec resolve_partition(reference()) -> ok | {error, not_implemented}.
-spec sync_join(node_spec()) -> ok | {error, self_join | not_implemented | any()}.
-spec update_members([node()]) -> ok | {error, not_implemented}.