FerricStore.Flow (ferricstore_sdk v0.4.2)

Copy Markdown View Source

High-level FerricFlow command helpers.

Functions build the same native command arguments as the Python SDK while keeping defaults simple: create and terminal commands return acknowledgements, while claim returns compact jobs with attributes.

Summary

Functions

cancel(client, id, opts)

cancel_payload(id, opts)

claim_due(client, type, opts)

claim_due_payload(type, opts)

complete(client, id, opts)

complete_many(client, jobs, opts \\ [])

complete_many_payload(jobs, opts \\ [])

complete_payload(id, opts)

create(client, id, opts)

create_many(client, items, opts)

create_many_payload(items, opts)

create_payload(id, opts)

enqueue(client, id, opts)

fail(client, id, opts)

fail_payload(id, opts)

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

get_payload(id, opts \\ [])

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

history_payload(id, opts \\ [])

list(client, opts \\ [])

list_payload(opts)

policy_get(client, type, opts \\ [])

@spec policy_get(pid(), binary(), keyword()) ::
  FerricStore.Flow.PolicySnapshot.t() | {:error, FerricStore.Error.t()}

Returns the typed policy snapshot and its monotonic generation.

policy_get_payload(type, opts \\ [])

policy_set(client, type, opts \\ [])

Deep-patches a Flow type policy and returns its typed snapshot.

Pass replace: true for full replacement. Pass expected_generation from a prior FerricStore.Flow.PolicySnapshot for compare-and-swap. CAS mutations are never retried automatically.

policy_set_payload(type, opts)

retry(client, id, opts)

retry_payload(id, opts)

search(client, opts \\ [])

search_payload(opts)

signal(client, id, opts)

signal_payload(id, opts)

transition(client, id, opts)

transition_payload(id, opts)

value_mget(client, refs, opts \\ [])

value_put(client, value, opts \\ [])