moduleacquire

package
v0.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package moduleacquire loads a ModuleRelease's target module from the OCI registry into a library *module.Module. A ModuleRelease references its module by registry path and version; the library kernel owns the registry fetch and in-memory load (Kernel.LoadModuleFromRegistry), so this package is a thin adapter that decodes the loaded value to the operator's *module.Module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Acquire

func Acquire(ctx context.Context, k *kernel.Kernel, path, version, registry string) (*module.Module, error)

Acquire loads the module at the given registry path and version into a library *module.Module using the shared kernel. It delegates to Kernel.LoadModuleFromRegistry, which fetches the module's source via CUE's native module machinery and loads it in memory as the main module — so the module's own cue.mod/module.cue resolves transitive dependencies and its kind/metadata are evaluated at the package root, with the registry applied per-call (no process-environment mutation, safe to call concurrently from reconcilers). The loaded value is decoded via Kernel.NewModuleFromValue.

The registry parameter is retained for signature stability; the kernel resolves the registry it was constructed with (see kernel.WithRegistry).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL