NatureWhistle.Notifier.Behaviour behaviour (nature_whistle v0.1.0)

Copy Markdown

Behaviour for notifiers that deliver alerts to external services.

Summary

Callbacks

Delivers an alert message to the configured service.

Callbacks

deliver(message, metadata, config)

@callback deliver(message :: String.t(), metadata :: map(), config :: keyword()) ::
  {:ok, term()} | {:error, term()}

Delivers an alert message to the configured service.

Returns {:ok, response} on success, {:error, reason} on failure.