Crosswake.Packs.Contracts (crosswake v0.1.0)

View Source

Typed pack lifecycle vocabulary shared across activation, shell UI, and proof lanes.

Summary

Types

install_stage()

@type install_stage() :: :preparing | :downloading | :verifying | :installing

state()

@type state() ::
  :checking
  | :not_installed
  | :installing
  | :available
  | :stale
  | :invalidating
  | :failed

t()

@type t() :: %Crosswake.Packs.Contracts{
  bytes: non_neg_integer() | nil,
  failure: Crosswake.Packs.Contracts.Failure.t() | nil,
  install: Crosswake.Packs.Contracts.Install.t() | nil,
  invalidation: Crosswake.Packs.Contracts.Invalidation.t() | nil,
  last_known_state: %{state: atom(), version: String.t()} | nil,
  pack_id: String.t(),
  required_version: String.t(),
  stale_reason: atom() | nil,
  state: state(),
  verification: Crosswake.Packs.Contracts.Verification.t() | nil,
  version: String.t() | nil
}

Functions

available(attrs)

@spec available(keyword()) :: t()

failed(attrs)

@spec failed(keyword()) :: t()

from_inventory(record)

@spec from_inventory(Crosswake.Packs.Inventory.t()) :: t()

installing(attrs)

@spec installing(keyword()) :: t()

invalidate(lifecycle, attrs)

@spec invalidate(
  t(),
  keyword()
) :: t()

not_installed(attrs)

@spec not_installed(keyword()) :: t()

stale(attrs)

@spec stale(keyword()) :: t()