EventBroker.Registry (Anoma v0.29.0)
I am the Registry for the PubSub system.
I am the central registry of all the topic subscriptions and filters. I am responsible for spawning filter agents, (un)subscribing to them, and keeping track of relations between them.
Summary
Types
I am the type of the registered subscribers. I map a subscriber pid to all their filter specs.
I am the type of the Registry.
Functions
I am the type of the registered filters, matching a filter agent to its PID.
Returns a specification to start this module under a supervisor.
Types
registered_filters()
@type registered_filters() :: %{required(EventBroker.filter_spec_list()) => pid()}
registered_subscribers()
@type registered_subscribers() :: %{ required(pid()) => [EventBroker.filter_spec_list()] }
I am the type of the registered subscribers. I map a subscriber pid to all their filter specs.
@type t() :: %EventBroker.Registry{ registered_filters: registered_filters(), registered_subscribers: registered_subscribers(), supervisor: atom() }
I am the type of the Registry.
My main functionality is to keep track of all spawned filter actors.
Fields
:supervisor
- The name of the dynamic supervisor launched on start.:registered_filters
- The map whose keys are a filter-spec dependency list and whose values are PID's of filter agents corresponding to said lists.:registered_subscribers
- The map whose keys are a subscriber PID mapped onto their filter specs. Default: %{}
Functions
I am the type of the registered filters, matching a filter agent to its PID.
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
start_link(args)
@spec start_link(list()) :: GenServer.on_start()