Module partisan_peer_service_connections

API for managing peer service connections.

Description

API for managing peer service connections

Data Types

channel()

channel() = atom()

entries()

entries() = [entry()]

entry()

entry() = {listen_addr(), channel(), pid()}

listen_addr()

listen_addr() = #{ip => inet:ip_address(), port => non_neg_integer()}

node_spec()

node_spec() = #{name => node(), listen_addrs => [listen_addr()], channels => [channel()], parallelism => non_neg_integer()}

t()

t() = dict:dict(node_spec(), [pid()])

Function Index

erase/2
find/2Finds connection pids in dictionary either by name or node spec.
foreach/2Apply a function to all connection entries.
new/0Creates a new dictionary of connections.
prune/2Prune all occurrences of a connection pid returns the node where the pruned pid was found.
store/3Store a connection pid.

Function Details

erase/2

erase(NodeName, Connections) -> any()

find/2

find(Node::atom() | node_spec(), Connections::t()) -> {ok, entries()} | {error, not_found}

Finds connection pids in dictionary either by name or node spec.

foreach/2

foreach(Fun::fun((node_spec(), [pid()]) -> ok), Connections::t()) -> ok

Apply a function to all connection entries

new/0

new() -> t()

Creates a new dictionary of connections.

prune/2

prune(Node::pid() | node_spec(), Connections::t()) -> {node_spec(), t()}

Prune all occurrences of a connection pid returns the node where the pruned pid was found

store/3

store(Node::node_spec(), Entry::entry(), Connections::t()) -> t()

Store a connection pid


Generated by EDoc