Portable lease issued by an Instance ownership adapter.
The fencing token is monotonic in the adapter's ownership domain. A local Registry lease is suitable only for a single-owner deployment; distributed hosts must provide a lease backed by their own linearizable authority.
Summary
Functions
Returns whether the lease has not expired at now.
Builds and validates a lease.
Builds a lease or raises with its stable reason.
Types
@type t() :: %Spectre.Instance.Owner.Lease{ expires_at: non_neg_integer() | nil, fencing_token: pos_integer(), issued_at: non_neg_integer(), metadata: map(), owner_id: String.t(), schema_version: pos_integer() }
Functions
@spec current?(t(), non_neg_integer()) :: boolean()
Returns whether the lease has not expired at now.
Builds and validates a lease.
Builds a lease or raises with its stable reason.