Regc.Oci.Transport behaviour (regc v0.0.2)
View SourceBehaviour 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 honor the request body and response mode, use the configured timeouts, and apply equivalent redirect and network-target protections if they follow redirects themselves. A transport that retries or redirects a request must respect body replayability.
Existing transports may continue reading request.max_body_bytes during the
compatibility period. Regc.Oci.Transport.Request.response_mode/1 resolves
both forms.
Summary
Types
@type result() :: {:ok, Regc.Oci.Transport.Response.t() | map()} | {:error, term()}
Callbacks
@callback request(Regc.Oci.Transport.Request.t(), Regc.Oci.Options.t()) :: result()