Regc.Client (regc v0.0.2)

View Source

Reusable registry client configuration.

A client is immutable configuration plus references to optional shared state. It can be reused concurrently; network requests are not serialized through a single client process.

Summary

Functions

Releases client-managed state. It is safe to call more than once.

Creates a client.

Types

t()

@type t() :: %Regc.Client{
  backends: %{required(String.t()) => module()},
  credentials: term(),
  host_configs: %{optional(String.t()) => Regc.Host.t()},
  hosts: map(),
  options: Regc.Oci.Options.t(),
  state: term()
}

Functions

close(client)

@spec close(t()) :: :ok

Releases client-managed state. It is safe to call more than once.

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a client.

Invalid client configuration raises ArgumentError; registry and protocol failures from operations remain tagged tuple errors.