defmodule Runbox.RunContext do @moduledoc """ Structure holding Runbox context of running slave node. """ defstruct [:master_node, :node, :sup_pid, :save_entity_mf] @typedoc """ Context of running run slave node. * `:master_node` - master node of run * `:node` - slave node of run * `:sup_pid` - pid of supervisor (running on slave) for run components running on slave * `:save_entity_mf` - callback definition (module and functin name) for saving entity state. Function is always called with 2 params: entity (`t:Runbox.StateStore.Entity.t/0`) and savepoint timestamp. """ @type t :: %__MODULE__{ master_node: node | nil, node: node | nil, sup_pid: pid, save_entity_mf: {module, atom} | nil } end