kalevala v0.1.0 Kalevala.Character.Foreman.Callbacks behaviour View Source

Callbacks for a integrating with the character foreman process

Link to this section Summary

Types

Options for starting the foreman process

Callbacks

Fill in state with any passed in options

Send options to a connection process

Send text to a connection process

Called when the foreman process is halted through a conn

The process is terminating from a :terminate message

The character updated and presence should be tracked

Link to this section Types

Options for starting the foreman process

Link to this section Callbacks

Link to this callback

init(state, opts)

View Source
init(state(), opts()) :: state()

Fill in state with any passed in options

Link to this callback

send_options(state, list)

View Source
send_options(state(), list()) :: :ok

Send options to a connection process

Link to this callback

send_output(state, list)

View Source
send_output(state(), list()) :: :ok

Send text to a connection process

Link to this callback

terminate(state)

View Source
terminate(state()) :: :ok

Called when the foreman process is halted through a conn

Perform whatever actions are required to start terminating.

Link to this callback

terminating(state)

View Source
terminating(state()) :: :ok

The process is terminating from a :terminate message

Perform whatever is required before terminating.

Link to this callback

track_presence(state, arg2)

View Source
track_presence(state(), Kalevala.Character.Conn.t()) :: :ok

The character updated and presence should be tracked