WebhooksEmitter.Interface behaviour (webhooks_emitter v0.2.0) View Source
Specification for WebhooksEmitter
Link to this section Summary
Link to this section Types
Specs
emitter_config() :: WebhooksEmitter.Config.t()
Specs
emitter_id() :: term()
Specs
Specs
event_names() :: [event_name(), ...]
Specs
event_payload() :: map()
Specs
request_id() :: String.t() | nil
Specs
url() :: String.t()
Link to this section Callbacks
Specs
attach(emitter_id(), event_name(), emitter_config()) :: :ok | {:error, :already_exists | :already_present}
Specs
attach_many(emitter_id(), event_names(), emitter_config()) :: :ok | {:error, :already_exists | :already_present}
Specs
detach(emitter_id()) :: :ok
Specs
emit(event_name(), event_payload(), request_id()) :: {:ok, request_id()}
Specs
list_emitters() :: [emitter_id()]
Specs
pause(emitter_id()) :: :ok
Specs
restart(emitter_id()) :: :ok | {:error, term()}
Specs
started?(emitter_id()) :: boolean()