FerricStore.SDK.Management (ferricstore_sdk v0.2.2)

Copy Markdown View Source

Narrow control-plane helpers for FerricStore management commands.

These functions use the stable FerricStore management command contract over native COMMAND_EXEC. They intentionally expose named operations instead of requiring callers to hand-build management command strings.

Summary

Functions

Returns the server management capability map.

Reads safe cluster control-plane metadata.

Deletes namespace metadata for a prefix.

Ensures namespace metadata exists for a prefix.

Reads safe Flow history metadata without payload search.

Queries safe Flow observability metadata without payload search.

Reads namespace metadata for a prefix.

Reads the quota specification for a namespace or scope.

Reads safe namespace usage metadata.

Reads safe quota usage for a namespace or scope.

Persists ACL state when the server supports ACL persistence.

Sets a quota specification for a namespace or scope.

Creates or updates an ACL user with the given Redis-compatible ACL rules.

Types

client()

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

response()

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

Functions

capabilities(client, opts \\ [])

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

Returns the server management capability map.

cluster_info(client, opts \\ [])

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

Reads safe cluster control-plane metadata.

del_user(client, username, opts \\ [])

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

Deletes an ACL user.

delete_namespace(client, prefix, opts \\ [])

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

Deletes namespace metadata for a prefix.

ensure_namespace(client, prefix, attrs \\ %{}, opts \\ [])

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

Ensures namespace metadata exists for a prefix.

flow_history(client, id, attrs \\ %{}, opts \\ [])

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

Reads safe Flow history metadata without payload search.

flow_query(client, attrs \\ %{}, opts \\ [])

@spec flow_query(client(), map() | keyword(), keyword()) :: response()

Queries safe Flow observability metadata without payload search.

get_namespace(client, prefix, opts \\ [])

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

Reads namespace metadata for a prefix.

get_quota(client, namespace, opts \\ [])

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

Reads the quota specification for a namespace or scope.

get_user(client, username, opts \\ [])

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

Reads one ACL user.

list_namespaces(client, opts \\ [])

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

Lists namespaces.

list_users(client, opts \\ [])

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

Lists ACL users.

namespace_usage(client, prefix, opts \\ [])

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

Reads safe namespace usage metadata.

quota_usage(client, namespace, opts \\ [])

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

Reads safe quota usage for a namespace or scope.

save_acl(client, opts \\ [])

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

Persists ACL state when the server supports ACL persistence.

set_quota(client, namespace, quota_spec, opts \\ [])

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

Sets a quota specification for a namespace or scope.

set_user(client, username, rules, opts \\ [])

@spec set_user(client(), binary(), [term()] | term(), keyword()) :: response()

Creates or updates an ACL user with the given Redis-compatible ACL rules.