community_theatre v0.1.1 CommunityTheatre.Message

A struct containing an inbound message and it's metadata.

Link to this section Summary

Functions

Create a new message struct given a topic, payload and received_at time.

Link to this section Types

Link to this type

t()

t() :: %CommunityTheatre.Message{
  payload: any(),
  received_at: DateTime.t(),
  topic: atom()
}

Link to this section Functions

Link to this function

init(topic, payload)

init(atom(), any()) :: {:ok, t()} | {:error, any()}
Link to this function

init(topic, payload, received_at)

init(atom(), any(), DateTime.t()) :: {:ok, t()} | {:error, any()}

Create a new message struct given a topic, payload and received_at time.