Spectre.Operation.Registry (Spectre v0.3.0)

Copy Markdown View Source

Resolves the closed operation catalog visible to one loop step.

Summary

Functions

Returns whether an operation id belongs to an Agent's closed registry.

Resolves an exact or JSON string operation reference in the Agent registry.

Functions

all(agent, definition)

@spec all(module(), Spectre.Operation.Definition.t()) ::
  {:ok, %{optional(term()) => Spectre.Operation.Spec.t()}} | {:error, term()}

registered?(agent, id)

@spec registered?(module(), term()) :: boolean()

Returns whether an operation id belongs to an Agent's closed registry.

resolve(agent, definition, id)

@spec resolve(module(), Spectre.Operation.Definition.t(), term()) ::
  {:ok, Spectre.Operation.Spec.t()} | {:error, term()}

resolve_id(agent, id)

@spec resolve_id(module(), term()) :: {:ok, term()} | {:error, term()}

Resolves an exact or JSON string operation reference in the Agent registry.