Ircxd.Client.Event (ircxd v1.1.0)

Copy Markdown View Source

Canonical client event envelope and public event-name catalog.

The legacy tuple or atom is retained in :legacy. :derivative? identifies alternate semantic or correlation views of content that may already have been emitted in another event.

Summary

Functions

Builds an event envelope from a legacy event.

Returns all public client event names.

Returns the event properties for a public event name.

Types

legacy()

@type legacy() :: atom() | tuple()

origin()

@type origin() :: :message | :internal | :derivative

t()

@type t() :: %Ircxd.Client.Event{
  batch: String.t() | nil,
  derivative?: boolean(),
  duplicate_msgid?: boolean(),
  label: String.t() | nil,
  legacy: legacy(),
  message: Ircxd.Message.t() | nil,
  name: atom(),
  origin: origin(),
  payload: term(),
  server_time: DateTime.t() | nil,
  terminal?: boolean()
}

Functions

from_legacy!(legacy, message_override \\ nil)

@spec from_legacy!(legacy(), Ircxd.Message.t() | nil) :: t()

Builds an event envelope from a legacy event.

names()

@spec names() :: [atom()]

Returns all public client event names.

spec(name)

@spec spec(atom()) :: map() | nil

Returns the event properties for a public event name.