event_nanny v0.1.0 EventNanny

Nanny for a GenEvent handler

This Application will create the Supervisor and manager under the same Parent Supervisor and every handler will be take care by GenServer and restart it when exit abnormally.

Summary

Functions

Sends a ack event notification

Adds a monitored event handler

Makes a synchronous call the the event handler

Sends an event notification

Removes an event handler

Starts the Nanny

Adds handler from app configuration

Returns a stream that consumes events

Replaces an old event handler with a new monitored one

Sends a sync event notification

Returns a list of all event handlers

Functions

ack_notify(event)

Sends a ack event notification.

add_mon_handler(handler, args)

Adds a monitored event handler.

call(handler, request, timeout \\ 5000)

Makes a synchronous call the the event handler

notify(event)

Sends an event notification.

remove_handler(handler, args)

Removes an event handler.

start(type, args)

Starts the Nanny

start_phase(atom, type, args)

Adds handler from app configuration

stop(reason \\ :normal, timeout \\ :infinity)

Stops the Nanny.

stream(timeout \\ :infinity)

Returns a stream that consumes events.

swap_mon_handler(handler1, args1, handler2, args2)

Replaces an old event handler with a new monitored one.

sync_notify(event)

Sends a sync event notification.

which_handlers()

Returns a list of all event handlers.