FerricStore.SDK.Invocation (ferricstore_sdk v0.2.2)

Copy Markdown View Source

FerricStore Enterprise invocation helpers.

These helpers keep Enterprise callers on the same stable native SDK surface as the rest of FerricStore. They build the public INVOCATION.* commands and send them through FerricStore.SDK.Native.Client.command_exec/4, so normal SDK routing, timeouts, authentication, and trusted request-context handling still apply.

Summary

Functions

Create an invocation from a named definition.

Fetch one invocation by id.

Fetch one invocation definition by name.

List invocation definitions.

List known invocation partitions for a definition.

Create or replace an invocation definition.

Types

client()

@type client() :: GenServer.server()

response()

@type response() :: {:ok, term()} | {:error, term()}

Functions

create(client, name, attrs, opts \\ [])

@spec create(client(), binary(), map(), keyword()) :: response()

Create an invocation from a named definition.

attrs are persisted invocation attributes. Optional create envelope fields:

  • :context - caller-supplied context embedded in the invocation envelope.
  • :idempotency_key - optional idempotency key understood by Enterprise.
  • :request_context - trusted proxy context sent out-of-band to the server.

get(client, id, opts \\ [])

@spec get(client(), binary(), keyword()) :: response()

Fetch one invocation by id.

get_definition(client, name, opts \\ [])

@spec get_definition(client(), binary(), keyword()) :: response()

Fetch one invocation definition by name.

list_definitions(client, opts \\ [])

@spec list_definitions(
  client(),
  keyword()
) :: response()

List invocation definitions.

list_partitions(client, name, opts \\ [])

@spec list_partitions(client(), binary(), keyword()) :: response()

List known invocation partitions for a definition.

Pass scope: "..." to restrict the partition list.

put_definition(client, definition, opts \\ [])

@spec put_definition(client(), map() | binary(), keyword()) :: response()

Create or replace an invocation definition.

Accepts either a JSON string or a map. Map input is encoded as JSON.