Regc.Oci.Options (regc v0.0.2)

View Source

Normalized options passed to custom registry transports.

Public Regc functions accept these options as a keyword list. A transport module implementing Regc.Oci.Transport receives this struct after the values have been validated and defaults have been applied.

Summary

Types

option_timeout()

@type option_timeout() :: non_neg_integer() | :infinity

t()

@type t() :: %Regc.Oci.Options{
  allow_insecure: boolean(),
  auth_actions: [:pull | :push | :delete],
  client_state: pid() | nil,
  connect_timeout: option_timeout(),
  credentials: Regc.Credential.provider(),
  host_configs: %{optional(String.t()) => Regc.Host.t()},
  hosts: map(),
  max_config_bytes: non_neg_integer(),
  max_index_depth: non_neg_integer(),
  max_index_manifests: non_neg_integer(),
  max_manifest_bytes: non_neg_integer(),
  max_redirects: non_neg_integer(),
  max_retries: non_neg_integer(),
  platform: term(),
  resolver: function() | nil,
  retry_backoff: non_neg_integer(),
  retry_max_delay: non_neg_integer(),
  timeout: option_timeout(),
  transport: function() | module() | nil,
  transport_options: keyword()
}

Functions

parse(options)

@spec parse(keyword() | t()) :: {:ok, t()} | {:error, {:invalid_option, atom()}}

validate(options)

@spec validate(t()) :: {:ok, t()} | {:error, {:invalid_option, atom()}}