AdfSenderConnector.Message (adf_sender_connector v0.4.1)

View Source

Notification message representation

Summary

Types

channel_ref()

@type channel_ref() :: String.t()

correlation_id()

@type correlation_id() :: String.t()

event_name()

@type event_name() :: String.t()

message_data()

@type message_data() :: any()

message_id()

@type message_id() :: String.t()

t()

@type t() :: t()

Functions

assert_valid(message)

@spec assert_valid(t()) :: {:ok, t()} | {:error, :invalid_message}

new(channel_ref, message_data, event_name)

@spec new(channel_ref(), message_data(), event_name()) :: t()

Creates a message with minimal data needed.

new(channel_ref, message_id, correlation_id, message_data, event_name)

Creates a message.

validate(messages)

@spec validate([map()]) :: [map()]