Regc.Oci.Transport behaviour (regc v0.0.1)

View Source

Behaviour for custom registry HTTP transports.

A transport performs one request and returns either a Regc.Oci.Transport.Response, a response-shaped map, or an error. Regc handles registry status codes and bearer authentication around the transport.

Implementations should enforce request.max_body_bytes while reading the response, use the configured timeouts, and apply equivalent redirect and network-target protections if they follow redirects themselves.

Summary

Types

result()

@type result() :: {:ok, Regc.Oci.Transport.Response.t() | map()} | {:error, term()}

Callbacks

request(t, t)

Functions

retryable_error?(reason)

@spec retryable_error?(term()) :: boolean()

user_agent()

@spec user_agent() :: String.t()