Behaviours: supervisor.
Authors: Steve Roques.
em_filter Top-Level Supervisor
Manages a dynamic pool of em_filter_server workers using a
simple_one_for_one strategy.
When start_agent/3 is called, one worker is started PER configured disco node. This means an agent automatically connects to every disco node listed in emergence.conf [em_disco] nodes.
nodes = localhost:8080, em_disco.roques.me
Port resolution rules (applied when no port is given): localhost / 127.0.0.1 → 8080, plain TCP any other host → 443, TLS
Explicit port always wins: localhost:9000 → 9000, plain TCP example.com:8080 → 8080, plain TCP (non-standard, no TLS) example.com:443 → 443, TLS
TLS is used when port = 443 OR host is not localhost/127.0.0.1 and no explicit port was given.| start_agent/3 | Starts one worker per configured disco node for the agent. |
| start_link/0 | |
| stop_agent/1 | Stops all workers for the given agent name. |
start_agent(AgentName::atom(), HandlerModule::module(), Config::map()) -> [{ok, pid()} | {error, term()}]
AgentName: Unique atom identifying the agent.
HandlerModule: Module exporting handle/2.
Config: Agent options map (capabilities, memory).
Starts one worker per configured disco node for the agent.
Reads the disco node list from emergence.conf (or env vars). Falls back to a single localhost:8080 worker if nothing is configured.start_link() -> {ok, pid()} | {error, term()}
stop_agent(AgentName::atom()) -> ok
Stops all workers for the given agent name.
Generated by EDoc