lkn-core v0.3.0 Lkn.Core.Puppeteer behaviour View Source

Link to this section Summary

Types

k()

A key to identify and reach a given Puppeteer

m()

A module which implements the Puppeteer behaviour

Link to this section Types

Link to this type init_args() View Source
init_args() :: any

A key to identify and reach a given Puppeteer.

A module which implements the Puppeteer behaviour.

Link to this type state() View Source
state() :: any

Link to this section Functions

Link to this macro defpuppeteer(name, list) View Source (macro)
Link to this function find_instance(puppeteer_key, map_key) View Source
find_instance(k, L.Map.k) :: Lkn.Core.Instance.k
Link to this function leave_instance(puppeteer_key, instance_key) View Source
leave_instance(k, Lkn.Core.Instance.k) :: :ok
Link to this function start_link(module, puppeteer_key, args) View Source
start_link(m, k, init_args) :: GenServer.on_start
Link to this function stop(puppeteer_key, reason \\ :normal) View Source

Link to this section Callbacks

Link to this callback destroy(puppeteer_key, s, instance_key, reason) View Source
destroy(puppeteer_key :: k, s :: state, instance_key :: Option.t(Lkn.Core.Instance.k), reason :: any) :: term
Link to this callback init_state(init_args) View Source
init_state(init_args) :: {:ok, state} | :error
Link to this callback instance_digest(s, instance_key, map_key, map, puppets) View Source
instance_digest(s :: state, instance_key :: Lkn.Core.Instance, map_key :: Lkn.Core.Map.k, map :: Lkn.Core.Entity.digest, puppets :: %{optional(Lkn.Core.Puppet.k) => Lkn.Core.Entity.digest}) :: state
Link to this callback leave_instance(s, instance_key) View Source
leave_instance(s :: state, instance_key :: Lkn.Core.Instance.k) :: state
Link to this callback puppet_enter(s, instance_key, puppet_key, digest) View Source
puppet_enter(s :: state, instance_key :: Lkn.Core.Instance.k, puppet_key :: Lkn.Core.Puppet.k, digest :: Lkn.Core.Entity.digest) :: state
Link to this callback puppet_leave(s, instance_key, puppet_key) View Source
puppet_leave(s :: state, instance_key :: Lkn.Core.Instance.k, puppet_key :: Lkn.Core.Puppet.k) :: state