Spectre.Operation.Request (Spectre v0.3.0)

Copy Markdown View Source

One portable request for a registered operation.

Summary

Types

t()

@type t() :: %Spectre.Operation.Request{
  branch: atom() | String.t() | nil,
  id: String.t(),
  input: term(),
  metadata: map(),
  operation: atom() | String.t(),
  phase: atom() | String.t() | nil
}

Functions

new(operation, input \\ nil, opts \\ [])

@spec new(atom() | String.t(), term(), keyword()) :: t()

validate(request)

@spec validate(t()) :: :ok | {:error, term()}

validate!(request)

@spec validate!(t()) :: t()