partisan_static_peer_service_manager (partisan v6.1.0)
View SourceSummary
Functions
Cast a message to a remote gen_server.
Cast a message to a remote gen_server.
Decode state.
Gensym support for forwarding.
Gensym support for forwarding.
Forward message to registered process on the remote side.
Return local node's view of cluster membership.
Inject a partition.
Attempt to join a remote node.
Leave the cluster, dropping every peer connection. Membership is reduced to this node.
Remove a peer from the cluster, dropping its connections. Membership here is explicit, so the peer stays out until it is joined again.
Return membership list.
Return membership list.
Trigger function on connection close for a given node.
Trigger Fun when the connection to Arg closes. With a channel option the trigger is per channel and Fun is passed the channel as a second argument; without one it fires when the node's last connection goes, which is what node monitoring is built on.
Trigger function on connection open for a given node.
Trigger Fun when a connection to Arg opens. See on_down/3 for the argument forms and the meaning of the channel option.
Return partitions.
Receive message from a remote manager.
Reserve a slot for the particular tag.
Resolve a partition.
Send message to a remote manager.
Same as start_link([]).
Join a remote node, returning once the connection is established.
Replaces the peer set with Nodes. Peers not already known are joined; members and pending peers absent from Nodes are dropped, exactly as leave/1 drops them.
Types
-type channel_subs() :: #{{'_' | node(), '_' | partisan:channel()} => [partisan_peer_service_manager:on_event_fun()]}.
-type membership() :: sets:set(partisan:node_spec()).
-type node_subs() :: #{'_' | node() => [partisan_peer_service_manager:on_event_fun()]}.
-type pending() :: [partisan:node_spec()].
-type state_t() :: #state{myself :: partisan:node_spec(), pending :: pending(), membership :: membership(), up_funs :: node_subs(), down_funs :: node_subs(), channel_up_funs :: channel_subs(), channel_down_funs :: channel_subs(), sync_joins :: sync_joins(), up_nodes :: sets:set(node()), up_channels :: sets:set({node(), partisan:channel()})}.
-type sync_joins() :: #{partisan:node_spec() => [gen_server:from()]}.
Functions
-spec cast_message(Term :: partisan:any_pid() | partisan:any_name(), MEssage :: partisan:message()) -> ok.
Cast a message to a remote gen_server.
Cast a message to a remote gen_server.
Decode state.
Gensym support for forwarding.
Gensym support for forwarding.
Forward message to registered process on the remote side.
Return local node's view of cluster membership.
Inject a partition.
Attempt to join a remote node.
Leave the cluster, dropping every peer connection. Membership is reduced to this node.
Remove a peer from the cluster, dropping its connections. Membership here is explicit, so the peer stays out until it is joined again.
Return membership list.
Return membership list.
Trigger function on connection close for a given node.
Trigger Fun when the connection to Arg closes. With a channel option the trigger is per channel and Fun is passed the channel as a second argument; without one it fires when the node's last connection goes, which is what node monitoring is built on.
Arg is a node, a node spec, or any/`_'' for every node.
Trigger function on connection open for a given node.
Trigger Fun when a connection to Arg opens. See on_down/3 for the argument forms and the meaning of the channel option.
Return partitions.
Receive message from a remote manager.
Reserve a slot for the particular tag.
Resolve a partition.
Send message to a remote manager.
Same as start_link([]).
Join a remote node, returning once the connection is established.
Replaces the peer set with Nodes. Peers not already known are joined; members and pending peers absent from Nodes are dropped, exactly as leave/1 drops them.