Regc.Host (regc v0.0.2)

View Source

Per-registry endpoint, TLS, routing, and request-limit configuration.

Host-map keys are logical registry names. :hostname may point that logical name at an alias, while :path_prefix places the Distribution API below a reverse-proxy prefix.

Summary

Types

t()

@type t() :: %Regc.Host{
  ca_certfile: String.t() | nil,
  client_certfile: String.t() | nil,
  client_keyfile: String.t() | nil,
  credential_host: String.t() | nil,
  disable_head: boolean(),
  hostname: String.t(),
  mirrors: [String.t()],
  name: String.t(),
  path_prefix: String.t(),
  priority: non_neg_integer(),
  request_concurrency: pos_integer(),
  request_rate: number(),
  resolved_mirrors: [t()],
  tls: tls_mode()
}

tls_mode()

@type tls_mode() :: :undefined | :enabled | :insecure | :disabled

Functions

new(name, host)

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

normalize_all(hosts)

@spec normalize_all(map()) :: {:ok, %{optional(String.t()) => t()}} | {:error, term()}