kitto v0.2.0 Kitto.Notifier

Summary

Functions

Emits a server-sent event to each of the active connections with the given topic and payload

Emits a server-sent event to each of the active connections with the given topic and payload to a specific process

Returns cached broadcasts

Caches the given payload with the key provided as the first argument

Resets the broadcast cache

Returns the registered connections

Removes a connection from the connections list

Callback implementation for Supervisor.init/1

Every new SSE connection gets all the cached payloads for each job. The last broadcasted payload of each job is cached

Updates the list of connections to use for broadcasting

Starts the connections cache agent

Starts the notifier supervision tree

Starts the notifier cache agent

Functions

broadcast!(topic, data)

Emits a server-sent event to each of the active connections with the given topic and payload

broadcast!(pid, topic, data)

Emits a server-sent event to each of the active connections with the given topic and payload to a specific process

cache()

Returns cached broadcasts

cache(topic, data)

Caches the given payload with the key provided as the first argument

clear_cache()

Resets the broadcast cache

connections()

Returns the registered connections

delete(conn)

Removes a connection from the connections list

init(atom)

Callback implementation for Supervisor.init/1.

initial_broadcast!(pid)

Every new SSE connection gets all the cached payloads for each job. The last broadcasted payload of each job is cached

register(conn)

Updates the list of connections to use for broadcasting

start_connections_cache()

Starts the connections cache agent

start_link()

Starts the notifier supervision tree

start_notifier_cache()

Starts the notifier cache agent