# `EventBroker.FilterAgent`

I am a Filter Agent module.

I implement the base server behavior of the spawned filter agent. In
general, I monitor subscribers of an individual filtering agent and
send whichever events I receive to them.

# `t`

```elixir
@type t() :: %EventBroker.FilterAgent{spec: struct(), subscribers: MapSet.t(pid())}
```

I am the type of the Filter Agent.

I contain the minimal info for a filter to work, namely the filter
specification to apply to incoming messages and subscribers to send
filtered messages to.

### Fields

- `:spec` - The filter specification. This is a structure of a module
            with a public filter API for the agent to call.
- `:subscribers` - The list of subscribers to send filtered messages to.
                   Default: MapSet.new()

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(struct()) :: GenServer.on_start()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
