View Source GracefulGenServer.Functions (Graceful GenServer v0.1.0)

Link to this section Summary

Functions

Handle info message.

This function initiates genserver.

Termination handler.

Link to this section Functions

Link to this function

handle_info(msg, state, opts)

View Source

Handle info message.

Keyword options:

  • :on_msg - optional callback invoked when message is received. on_msg(msg, state). Should return handle_info result.
  • :on_exit - optional callback invoked when process exits. on_exit(reason, state)
  • :as - optional name, triggering logging

This function initiates genserver.

Keyword options:

  • :do - callback invoked with init args. Should return init state
  • :as - optional name, triggering logging
Link to this function

terminate(reason, state, opts)

View Source

Termination handler.

Keyword options:

  • :on_exit - optional callback invoked when process exits. on_exit(reason, state)
  • :as - optional name, triggering logging