View Source Lightning.CLI.Result (Lightning v2.10.4)

Struct that wraps the output of an OpenFn CLI call.

Containing the keys:

  • start_time
  • end_time
  • status
  • logs

Logs

The OpenFn CLI returns JSON formatted log lines, which are decoded and added to a Result struct.

There are two kinds of output:

{"level":"<<level>>","name":"<<module>>","message":"..."],"time":<<timestamp>>}

These are usually for general logging, and debugging.

{"message":["<<message|filepath|output>>"]}

The above is the equivalent of the output of a command

Summary

Functions

Returns message type log lines from a Result.

Types

@type t() :: %Lightning.CLI.Result{
  end_time: integer(),
  logs: list(),
  start_time: integer(),
  status: integer()
}

Functions

@spec get_messages(t()) :: [String.t()]

Returns message type log lines from a Result.

Link to this function

parse(result, extra \\ [])

View Source