Regc.Oci.Options (regc v0.0.1)

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(),
  connect_timeout: option_timeout(),
  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(),
  platform: term(),
  resolver: function() | nil,
  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()}}