ExAtlas.Spec.ComputeRequest (ExAtlas v0.5.0)

Copy Markdown View Source

Provider-agnostic request for a compute resource (pod/machine/instance).

Fields that a given provider doesn't natively support are simply ignored by that provider's translator. Fields unique to a provider can be passed through :provider_opts.

Summary

Functions

Build a validated ComputeRequest from keyword opts.

Build a validated ComputeRequest from keyword opts. Raises on invalid input.

Types

auth_scheme()

@type auth_scheme() :: :none | :bearer | :signed_url

cloud_type()

@type cloud_type() :: :secure | :community | :any

port_spec()

@type port_spec() :: {pos_integer(), :http | :tcp}

t()

@type t() :: %ExAtlas.Spec.ComputeRequest{
  auth: auth_scheme(),
  cloud_type: cloud_type(),
  container_disk_gb: pos_integer() | nil,
  env: %{optional(String.t()) => String.t()},
  gpu: atom(),
  gpu_count: pos_integer(),
  idle_ttl_ms: pos_integer() | nil,
  image: String.t() | nil,
  name: String.t() | nil,
  network_volume_id: String.t() | nil,
  ports: [port_spec()],
  provider_opts: map(),
  region_hints: [String.t()],
  spot: boolean(),
  template_id: String.t() | nil,
  volume_gb: pos_integer() | nil
}

Functions

new(opts)

@spec new(keyword() | map()) ::
  {:ok, t()} | {:error, NimbleOptions.ValidationError.t()}

Build a validated ComputeRequest from keyword opts.

new!(opts)

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

Build a validated ComputeRequest from keyword opts. Raises on invalid input.