Opsmaru.Incus.OCI (opsmaru_incus v0.1.0)

Copy Markdown View Source

Portable pinned OCI image semantics through an explicit host-owned adapter.

new!/5 is passive. resolve/3 inspects an alias and returns native alias/image models plus a new immutable cache value; image/2 reads that cache. No global cache, command runner, filesystem state or credential generation is involved. image_file/3 delivers converted binary metadata/rootfs to acknowledged sinks. Registry authentication and installed conversion remain host acceptance gates.

Summary

Functions

Native OCI alias architecture mapping; the host explicitly supplies its local architecture.

Passive native OCI origin metadata; the explicit HTTPS connection is not inferred from adapter config.

Native no-op disconnect; no persistent connection or host conversion is owned by this value.

Passive bounded HTTP handle on the explicitly supplied verified HTTPS origin; no conversion adapter call.

Read a previously resolved image; the original client cache remains unchanged.

Convert through the host adapter; both native output sinks are explicit. The request carries the pinned metadata.yaml bytes the adapter packs beside config.json. As natively, an unknown fingerprint is reported before the sinks.

Passive construction. certificate: is the registry certificate PEM, Go's TLSServerCert: connection info reports it and copies or instance pulls hand it to the target. It does not change how this connection verifies the registry.

Resolve a container alias; native OCI rejects virtual-machine image types.

Native unsupported OCI methods, without probing a registry or a host tool.

Types

t()

@type t() :: %Opsmaru.Incus.OCI{
  adapter: term(),
  cache: term(),
  certificate: term(),
  config: term(),
  connection: term(),
  context: term()
}

Functions

alias_architectures(client, name, local_architecture, image_type \\ "")

Native OCI alias architecture mapping; the host explicitly supplies its local architecture.

connection_info(client)

Passive native OCI origin metadata; the explicit HTTPS connection is not inferred from adapter config.

disconnect(oci)

Native no-op disconnect; no persistent connection or host conversion is owned by this value.

http_client(client)

Passive bounded HTTP handle on the explicitly supplied verified HTTPS origin; no conversion adapter call.

http_request(client, method, path, opts \\ [])

image(client, fingerprint)

Read a previously resolved image; the original client cache remains unchanged.

image_file(client, fingerprint, sinks)

Convert through the host adapter; both native output sinks are explicit. The request carries the pinned metadata.yaml bytes the adapter packs beside config.json. As natively, an unknown fingerprint is reported before the sinks.

new!(connection, context, adapter, config, opts \\ [])

Passive construction. certificate: is the registry certificate PEM, Go's TLSServerCert: connection info reports it and copies or instance pulls hand it to the target. It does not change how this connection verifies the registry.

resolve(client, name, image_type \\ "")

Resolve a container alias; native OCI rejects virtual-machine image types.

unsupported(client, method)

Native unsupported OCI methods, without probing a registry or a host tool.