Wardrik.Sleeper (wardrik v0.1.0-rc.1)

Copy Markdown

Puts defined agents to sleep after their idle timeout. An agent wakes when something asks it.

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the sleeper.

Starts the idle timer for the newly defined agent id.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(wardrik)

@spec start_link(Wardrik.t()) :: GenServer.on_start()

Starts the sleeper.

watch(wardrik, id)

@spec watch(Wardrik.t(), String.t()) :: :ok

Starts the idle timer for the newly defined agent id.