Explicit seam for resolving and bounding tenant scope across runtime helpers.
Summary
Types
Callbacks
@callback compose_bucket_identity( context :: Rulestead.Context.t(), bucket_by :: atom() | String.t(), default_identity :: String.t() | nil ) :: String.t() | nil
@callback resolve_tenant(conn_or_socket_or_params :: term()) :: tenant_scope()
@callback same_tenant?(a :: tenant_scope(), b :: tenant_scope()) :: boolean()
@callback tenant_topic(base_topic :: String.t(), tenant :: tenant_scope()) :: String.t()
Functions
@spec compose_bucket_identity( Rulestead.Context.t(), atom() | String.t(), String.t() | nil ) :: String.t() | nil
@spec module() :: module()
@spec normalize_tenant(term()) :: tenant_scope()
@spec resolve_tenant(term()) :: tenant_scope()
@spec same_tenant?(tenant_scope(), tenant_scope()) :: boolean()
@spec tenant_topic(String.t(), tenant_scope()) :: String.t()