Hemdal.Config.Notifier (Hemdal v1.2.1)

View Source

Notifier is in charge of define the amount of notifiers it should be in use for a notification, and the data to perform the notification.

The available fields are the following ones:

  • token is the information needed to send a message for some platforms like Slack or Mattermost. But it could means even a password for an email backend.
  • type the name used to be concatenated to Hemdal.Notifier and find for the module.
  • username is the name of the user to show the notification. But it could means different things depending on the backend. For an email backend it could be the user/email to send the message.
  • log_level used to send the notifications. If we specify an error log level it will notify only when a change from/to error is happening. See Hemdal.Event.Notification for further information.
  • metadata the extra data sent to the notifier.

Summary

Types

t()

@type t() :: %Hemdal.Config.Notifier{
  log_level: String.t(),
  metadata: map(),
  module: Hemdal.Config.Module.t() | atom(),
  token: String.t(),
  username: String.t()
}

Functions

cast(params, opts \\ [])

Callback implementation for Construct.cast/2.

make(params \\ %{}, opts \\ [])

Callback implementation for Construct.make/2.

make!(params \\ %{}, opts \\ [])

Callback implementation for Construct.make!/2.