View Source Runbox.Runtime.OutputAction (runbox v13.0.1)

Output Action for internal use by Runtime

Summary

Types

t()

Runtime Output Action

Functions

Returns true if valid output action body.

Creates a new output action.

Returns true if valid output action.

Types

@type t() :: %Runbox.Runtime.OutputAction{
  body:
    Runbox.Scenario.OutputAction.oa_params()
    | Runbox.Scenario.OutputAction.BadOutputAction.t(),
  run_id: String.t(),
  scenario_id: String.t(),
  timestamp: integer()
}

Runtime Output Action

Functions

@spec is_oa_body?(Runbox.Scenario.OutputAction.oa_params() | any()) :: boolean()

Returns true if valid output action body.

Link to this function

new(params, timestamp, scenario_id, run_id)

View Source
@spec new(
  params :: Runbox.Scenario.OutputAction.oa_params(),
  integer(),
  String.t(),
  String.t()
) :: t()

Creates a new output action.

To produce a valid output action, the params have to be one of the accepted structs. See the documentation of the particular structs for details.

If the params are not one of the accepted structs or some of the fields do not pass validation, it returns an output action with body set to Runbox.Scenario.OutputAction.BadOutputAction.t/0 with original params inside.

@spec valid?(t() | any()) :: boolean()

Returns true if valid output action.