Spell.Role.Publisher

The Spell.Role.Publisher module implements the publisher behaviour.

Source

Summary

call_publish(peer, topic, options \\ [options: %{acknowledge: true}])

Synchronously publish a message from peer for topic

cast_publish(peer, topic, options \\ [])

Publish a message from peer

get_features(options)

Announces the publisher role

handle_call(message, from, peer, state)

Callback implementation for Spell.Role.handle_call/4

handle_message(message, peer, state)

Callback implementation for Spell.Role.handle_message/3

init(peer_options, options)

Callback implementation for Spell.Role.init/2

on_close(peer, state)

Callback implementation for Spell.Role.on_close/2

on_open(peer, state)

Callback implementation for Spell.Role.on_open/2

receive_published(peer, request_id)

Receive a PUBLISHED message from peer for request_id

Types

t :: %Spell.Role.Publisher{published: HashDict.t(String.t, Spell.Message.t)}

Functions

call_publish(peer, topic, options \\ [options: %{acknowledge: true}])

Synchronously publish a message from peer for topic.

Source
cast_publish(peer, topic, options \\ [])

Publish a message from peer.

Source
get_features(options)

Announces the publisher role.

No advanced features are yet supported.

Source
handle_call(message, from, peer, state)

Callback implementation for Spell.Role.handle_call/4.

Source
handle_message(message, peer, state)

Callback implementation for Spell.Role.handle_message/3.

Source
init(peer_options, options)

Callback implementation for Spell.Role.init/2.

Source
on_close(peer, state)

Callback implementation for Spell.Role.on_close/2.

Source
on_open(peer, state)

Callback implementation for Spell.Role.on_open/2.

Source
receive_published(peer, request_id)

Receive a PUBLISHED message from peer for request_id.

Note: The PUBLISH request must set acknowledge: true to receive a response.

Source