api

package
v1.12.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package api holds the leaf types and injection seam shared between the module render service and the CueX module provider. It imports only the standard library so neither the provider nor the CueX compiler pulls in pkg/module/service (which would create an import cycle through the CueX compiler).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultRenderer

func SetDefaultRenderer(r Renderer)

SetDefaultRenderer installs the process-wide renderer (called once at startup).

Types

type ModuleRequest

type ModuleRequest struct {
	Module   string
	Registry string
	// Namespace is where the module's definitions install. Empty means the
	// default system namespace. It does not place the owned Application, which
	// always lives in the system namespace. The module is still installed once
	// cluster-wide.
	Namespace string
	// Version selects the module package version (the OCI/ECR tag vela module
	// publish writes from _module.cue's version field). Empty resolves the
	// highest published semver tag.
	Version string
}

ModuleRequest is the resolved input for rendering one module. There is no per-line selector: enablement is the module author's, via each line's enabled flag.

type ModuleResult

type ModuleResult struct {
	Application map[string]interface{}
}

ModuleResult is the rendered output: the module's owned Application as a generic map, ready to hand back to CUE.

type Renderer

type Renderer interface {
	RenderModule(ctx context.Context, req ModuleRequest) (*ModuleResult, error)
}

Renderer fetches a module and renders its owned Application without dispatching anything to the cluster.

func DefaultRenderer

func DefaultRenderer() Renderer

DefaultRenderer returns the installed renderer, or nil if startup has not wired one.

Jump to

Keyboard shortcuts

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