SquidSonar.SquidieClient behaviour (squid_sonar v0.2.0)

Copy Markdown View Source

Client boundary for Squidie public APIs.

Summary

Callbacks

Approves a manual approval run.

Requests run cancellation.

Loads explanation data for a run.

Loads a run inspection snapshot.

Loads graph inspection data for a run.

Lists recent Squidie runs.

Rejects a manual approval run.

Starts a replay for a terminal run.

Resumes a paused run.

Starts a run from a compiled Squidie workflow module.

Starts a run from a runtime-authored workflow spec.

Functions

Approves a manual approval run with host-provided control attributes.

Requests cancellation for a run through Squidie.

Loads operator-facing explanation data for a run.

Loads a run inspection snapshot from Squidie.

Loads graph inspection data for a Squidie run.

Lists recent Squidie runs through the configured runtime.

Rejects a manual approval run with host-provided control attributes.

Starts a replay for a terminal run.

Resumes a paused run with host-provided control attributes.

Starts a run from a compiled Squidie workflow module.

Starts a run from a runtime-authored workflow spec.

Callbacks

approve(term, map, keyword)

@callback approve(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Approves a manual approval run.

cancel(term, keyword)

@callback cancel(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Requests run cancellation.

explain_run(term, keyword)

@callback explain_run(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Explanation.Diagnostic.t()} | {:error, term()}

Loads explanation data for a run.

inspect_run(term, keyword)

@callback inspect_run(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Loads a run inspection snapshot.

inspect_run_graph(term, keyword)

@callback inspect_run_graph(
  term(),
  keyword()
) :: {:ok, Squidie.Runs.GraphInspection.t()} | {:error, term()}

Loads graph inspection data for a run.

list_runs(keyword, keyword)

@callback list_runs(keyword(), keyword()) ::
  {:ok, [Squidie.ReadModel.Listing.Summary.t()]} | {:error, term()}

Lists recent Squidie runs.

reject(term, map, keyword)

@callback reject(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Rejects a manual approval run.

replay(term, keyword)

@callback replay(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Starts a replay for a terminal run.

resume(term, map, keyword)

@callback resume(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Resumes a paused run.

start(module, map, keyword)

@callback start(module(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Starts a run from a compiled Squidie workflow module.

start_spec(term, map, keyword)

@callback start_spec(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Starts a run from a runtime-authored workflow spec.

Functions

approve(run_id, attrs, opts)

@spec approve(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Approves a manual approval run with host-provided control attributes.

cancel(run_id, opts)

@spec cancel(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Requests cancellation for a run through Squidie.

explain_run(run_id, opts)

@spec explain_run(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Explanation.Diagnostic.t()} | {:error, term()}

Loads operator-facing explanation data for a run.

inspect_run(run_id, opts)

@spec inspect_run(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Loads a run inspection snapshot from Squidie.

inspect_run_graph(run_id, opts)

@spec inspect_run_graph(
  term(),
  keyword()
) :: {:ok, Squidie.Runs.GraphInspection.t()} | {:error, term()}

Loads graph inspection data for a Squidie run.

list_runs(filters, opts)

@spec list_runs(keyword(), keyword()) ::
  {:ok, [Squidie.ReadModel.Listing.Summary.t()]} | {:error, term()}

Lists recent Squidie runs through the configured runtime.

reject(run_id, attrs, opts)

@spec reject(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Rejects a manual approval run with host-provided control attributes.

replay(run_id, opts)

@spec replay(
  term(),
  keyword()
) :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Starts a replay for a terminal run.

resume(run_id, attrs, opts)

@spec resume(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Resumes a paused run with host-provided control attributes.

start(workflow, payload, opts)

@spec start(module(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Starts a run from a compiled Squidie workflow module.

start_spec(spec, payload, opts)

@spec start_spec(term(), map(), keyword()) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}

Starts a run from a runtime-authored workflow spec.