View Source Actors.Registry.ActorRegistry (spawn v1.0.0-rc.21)
The ActorRegistry
module provides a registry for actor entities.
It allows for registering and looking up actors and also provides methods for adding and removing invocation requests for actors.
Summary
Functions
Get all invocations stored for actor
Fetch current entities of the service.
Returns HostActor
with Host and specific actor.
Register member
entities to the ActorRegistry.
Returns Cluster
with all Host members.
Registers a invocation request in CRDT Database Usually used for invocation schedulings
Removes a invocation request in CRDT Database Usually used for invocation schedulings
Functions
Get all invocations stored for actor
Examples
iex> ActorRegistry.get_all_invocations()
[<<10, 14, 10, 12, 115, 112>>]
@spec get_hosts_by_actor(Eigr.Functions.Protocol.Actors.ActorId.t(), Keyword.t()) :: {:ok, Member.t()} | {:not_found, []}
@spec lookup(Eigr.Functions.Protocol.Actors.ActorId.t(), Keyword.t()) :: {:ok, Actors.Registry.HostActor.t()} | {:not_found, []}
Fetch current entities of the service.
Returns HostActor
with Host and specific actor.
@spec register([Actors.Registry.HostActor.t()]) :: :ok
Register member
entities to the ActorRegistry.
Returns Cluster
with all Host members.
Examples
iex> hosts = [%HostActor{node: Node.self(), actor: actor, opts: []}}]
iex> ActorRegistry.register(hosts)
:ok
Registers a invocation request in CRDT Database Usually used for invocation schedulings
Removes a invocation request in CRDT Database Usually used for invocation schedulings