View Source Runbox.Runtime.StateLoader behaviour (runbox v21.2.0)

Module handles run state load/initialization.

Summary

Functions

Fetches state into run start recipe.

Callbacks

Link to this callback

init_new_state(t, instance_ctx, start_recipe)

View Source
@callback init_new_state(
  Runbox.Scenario.StartParams.t(),
  instance_ctx :: map(),
  start_recipe :: []
) ::
  {:ok, start_recipe :: []} | {:error, :no_savepoint}
Link to this callback

load_existing_state(t, instance_ctx, start_recipe)

View Source
@callback load_existing_state(
  Runbox.Scenario.StartParams.t(),
  instance_ctx :: map(),
  start_recipe :: []
) ::
  {:ok, start_recipe :: []} | {:error, :no_savepoint}

Functions

Link to this function

load(start_params, instance_context, start_recipe)

View Source
@spec load(Runbox.Scenario.StartParams.t(), map(), start_recipe :: []) ::
  {:ok, start_recipe :: []} | {:error, :no_savepoint}

Fetches state into run start recipe.