GroundPlane.Contracts.Fence (GroundPlane Contracts v0.1.0)

Copy Markdown View Source

Struct and comparison helpers for fenced ownership.

Summary

Types

t()

@type t() :: %GroundPlane.Contracts.Fence{
  attach_grant_ref: String.t() | nil,
  authority_scope: GroundPlane.Contracts.Fence.AuthorityScope.t() | nil,
  credential_handle_ref: String.t() | nil,
  credential_lease_ref: String.t() | nil,
  credential_scope: GroundPlane.Contracts.Fence.CredentialScope.t() | nil,
  epoch: non_neg_integer(),
  epoch_ref: GroundPlane.Contracts.Fence.Epoch.t() | nil,
  fence_token: String.t() | nil,
  holder: String.t(),
  identity: GroundPlane.Contracts.Fence.Identity.t() | nil,
  installation_revision_ref: String.t() | nil,
  lease_id: String.t(),
  operation_class: String.t() | nil,
  operation_policy_ref: String.t() | nil,
  persistence_posture: map() | nil,
  persistence_scope: GroundPlane.Contracts.Fence.PersistenceScope.t() | nil,
  policy_revision_ref: String.t() | nil,
  resource: String.t(),
  resource_account_ref: String.t() | nil,
  resource_family: String.t() | nil,
  resource_instance_ref: String.t() | nil,
  rotation_epoch: non_neg_integer() | nil,
  target_grant_revision: String.t() | nil,
  target_ref: String.t() | nil,
  tenant_id: String.t() | nil
}

Functions

authorize_credential_materialization(lease, fence, context, now)

@spec authorize_credential_materialization(
  GroundPlane.Contracts.Lease.t(),
  t(),
  map(),
  DateTime.t()
) ::
  {:ok, map()} | {:error, {atom(), map()}}

authorize_restart_reuse(lease, fence, now)

@spec authorize_restart_reuse(GroundPlane.Contracts.Lease.t(), t(), DateTime.t()) ::
  {:ok, map()} | {:error, {atom(), map()}}

authorize_retry_dispatch(lease, fence, context, now)

@spec authorize_retry_dispatch(
  GroundPlane.Contracts.Lease.t(),
  t(),
  map(),
  DateTime.t()
) ::
  {:ok, map()} | {:error, {atom(), map()}}

from_lease(lease)

@spec from_lease(GroundPlane.Contracts.Lease.t()) :: t()

new(attrs)

@spec new(map() | keyword()) :: {:ok, t()} | {:error, term()}

new!(attrs)

@spec new!(map() | keyword()) :: t()

newer_than?(fence1, fence2)

@spec newer_than?(t(), t()) :: boolean()