Kalevala.Character.Foreman.Callbacks behaviour (kalevala v0.1.0) 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

Specs

opts() :: Keyword.t()

Options for starting the foreman process

Specs

Link to this section Callbacks

Specs

init(state(), opts()) :: state()

Fill in state with any passed in options

Link to this callback

send_options(state, list)

View Source

Specs

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

Send options to a connection process

Link to this callback

send_output(state, list)

View Source

Specs

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

Send text to a connection process

Specs

terminate(state()) :: :ok

Called when the foreman process is halted through a conn

Perform whatever actions are required to start terminating.

Specs

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

Specs

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

The character updated and presence should be tracked