View Source partisan_peer_service (partisan v5.0.0-rc.8)
peer_service_manager
) which must be one of the Partisan's managers implementing partisan_peer_service_manager
, i.e. one of:Each node running Partisan listens for connections on a particular IP address and port. This is the information that is required when other nodes wish to join this node.
Summary
Functions
Timeout
ms for a response from the server.Node
, that are running.join (NodeSpec)
will not work for the removed node. The removed node must be restarted first.partisan_pluggable_peer_service_manager
or partisan_static_peer_service_manager
this is the set of all cluster members. However, if you're using other managers, the result will only be a sampling of the nodes.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 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.
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.
Types
-type ttl() :: non_neg_integer().
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() -> {ok, partisan_plumtree_broadcast:exchanges()} | {error, {badrpc, Reason :: any()}}.
-spec exchanges(node()) -> {ok, partisan_plumtree_broadcast:exchanges()} | {error, {badrpc, Reason :: any()}}.
Node
, that are running.
-spec get_local_state() -> term().
-spec inject_partition(partisan:node_spec(), ttl()) -> {ok, reference()} | {error, not_implemented}.
-spec join(partisan:node_spec() | node() | list) -> ok | {error, self_join | any()}.
-spec leave() -> ok.
-spec leave(partisan: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() | partisan:node_spec()) -> boolean().
partisan_pluggable_peer_service_manager
or partisan_static_peer_service_manager
this is the set of all cluster members. However, if you're using other managers, the result will only be a sampling of the nodes.
-spec members() -> {ok, [node()]}.
-spec members_for_orchestration() -> [partisan:node_spec()].
-spec on_down(node() | partisan:node_spec() | any | '_', function()) -> ok | {error, not_implemented}.
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.
partisan_pluggable_peer_service_manager
or partisan_static_peer_service_manager
.
-spec on_down(node() | partisan:node_spec() | any | '_', partisan_peer_service_manager:on_event_fun(), Opts :: #{channel => partisan:channel()}) -> ok | {error, not_implemented}.
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.
partisan_pluggable_peer_service_manager
or partisan_static_peer_service_manager
.
-spec on_up(node() | partisan:node_spec() | any | '_', partisan_peer_service_manager:on_event_fun()) -> ok | {error, not_implemented}.
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.
partisan_pluggable_peer_service_manager
or partisan_static_peer_service_manager
.
-spec on_up(node() | partisan:node_spec() | any | '_', partisan_peer_service_manager:on_event_fun(), Opts :: #{channel => partisan:channel()}) -> ok | {error, not_implemented}.
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.
partisan_pluggable_peer_service_manager
or partisan_static_peer_service_manager
.
-spec partitions() -> {ok, partisan_peer_service_manager:partitions()} | {error, not_implemented}.
-spec reserve(atom()) -> ok | {error, no_available_slots}.
-spec resolve_partition(reference()) -> ok | {error, not_implemented}.
-spec sync_join(partisan:node_spec()) -> ok | {error, self_join | not_implemented | any()}.
-spec update_members(Members :: [partisan:node_spec()]) -> ok | {error, not_implemented}.