Jidoka.Operation.Source.Local (Jidoka v0.9.0)

Copy Markdown View Source

Local operation source backed by Elixir functions.

This source is primarily for deterministic tests, examples, and lightweight in-process operations. It is deliberately normalized through the same operation contract as Jido actions.

Summary

Functions

Builds a local operation source from handler definitions.

Builds a local operation source and raises if the definitions are invalid.

Types

handler()

operation_def()

@type operation_def() :: %{
  name: String.t(),
  handler: handler(),
  description: String.t() | nil,
  idempotency: Jidoka.Agent.Spec.Operation.idempotency(),
  kind: atom(),
  metadata: map()
}

t()

@type t() :: %Jidoka.Operation.Source.Local{operations: [operation_def()]}

Functions

new(attrs)

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

Builds a local operation source from handler definitions.

new!(attrs)

@spec new!(keyword() | map()) :: t()

Builds a local operation source and raises if the definitions are invalid.