message() = #{topic => binary() | nil, event => binary() | nil, payload => term(), ref => binary() | nil, ebus_t => message}
Defines a message dispatched over transport to channels and vice-versa. The message format requires the following keys:
topic
: The binary topic or topic:subtopic` pair namespace,
for example `<<"messages">>
, <<"messages:123">>
.event
: The binary event name, for example <<"ebus_join">>
.payload
: The message payload.ref
: The unique binary ref.from_map/1 | |
new/0 | Equivalent to new(nil). |
new/1 | Equivalent to new(Topic, nil). |
new/2 | Equivalent to new(Topic, Event, nil). |
new/3 | Equivalent to new(Topic, Event, Payload, nil). |
new/4 |
from_map(Map::map()) -> message()
new() -> any()
Equivalent to new(nil).
new(Topic) -> any()
Equivalent to new(Topic, nil).
new(Topic, Event) -> any()
Equivalent to new(Topic, Event, nil).
new(Topic, Event, Payload) -> any()
Equivalent to new(Topic, Event, Payload, nil).
new(Topic::binary() | nil, Event::binary() | nil, Payload::term(), Ref::binary() | nil) -> message()
Generated by EDoc