Documentation ¶
Overview ¶
Package message exposes the generic Message type, used to represent a message in a system (e.g. Event, Command, etc.).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
Envelope bundles a Message to be exchanged with optional Metadata support.
func (Envelope[T]) ToGenericEnvelope ¶
func (e Envelope[T]) ToGenericEnvelope() GenericEnvelope
ToGenericEnvelope maps the Envelope instance into a GenericEnvelope one.
type GenericEnvelope ¶
GenericEnvelope is an Envelope type that can be used when the concrete Message type in the Envelope is not of interest.
type Message ¶
type Message interface {
Name() string
}
Message is a Message payload.
Each payload should have a unique name identifier, that can be used to uniquely route a message to its type.
type Metadata ¶
Metadata contains some data related to a Message that are not functional for the Message itself, but instead functioning as supporting information to provide additional context.