Module em_pop

Function Index

add_peer/3Contact a remote em_pop node and register it as a known peer.
gossip_tick/1Trigger one gossip tick synchronously.
id/1Return the unique binary ID of this node.
peers/1Return all currently known peers.
peers_for/3Return top-K peers ordered by cosine similarity to QueryVec.
start_link/1Start a population protocol node.
stop/1Stop a node and free its port.
trust/2Return the trust score for a peer (0.0 = unknown, 1.0 = fully trusted).
vector/1Return the capability vector this node was started with.

Function Details

add_peer/3

add_peer(Node::pid(), Host::inet:hostname(), Port::inet:port_number()) -> ok | {error, term()}

Contact a remote em_pop node and register it as a known peer.

gossip_tick/1

gossip_tick(Node::pid()) -> ok

Trigger one gossip tick synchronously.

id/1

id(Node::pid()) -> binary()

Return the unique binary ID of this node.

peers/1

peers(Node::pid()) -> [map()]

Return all currently known peers.

peers_for/3

peers_for(Node::pid(), QueryVec::binary(), K::pos_integer()) -> [{map(), float()}]

Return top-K peers ordered by cosine similarity to QueryVec.

start_link/1

start_link(Opts::map()) -> {ok, pid()} | {error, term()}

Start a population protocol node.

stop/1

stop(Node::pid()) -> ok

Stop a node and free its port.

trust/2

trust(Node::pid(), PeerId::binary()) -> float()

Return the trust score for a peer (0.0 = unknown, 1.0 = fully trusted).

vector/1

vector(Node::pid()) -> binary()

Return the capability vector this node was started with.


Generated by EDoc