environment

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package environment provides two standalone helpers other mediators use to interact with the Environment CR that roots their delivery chain: EnsureEnvironment (find-or-create the Environment named by an object's environments.blanketops.dev/{name,type} labels) and PatchEnvironmentAggregate (resolve the Environment's contract, apply a caller-supplied mutation, and re-encode it back onto the CR).

Unlike the per-CR mediators under this same internal/mediators tree, this package owns no Mediator type of its own — every other mediator's EnsurePrerequisites calls into these functions directly when it needs to read or update the shared Environment the delivery chain hangs off of.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureEnvironment

func EnsureEnvironment(
	ctx context.Context,
	c client.Client,
	obj client.Object,
	contract runtime.RawExtension,
) (*env1alpha1.Environment, error)

EnsureEnvironment fetches the Environment named by obj's environments.blanketops.dev/{name,type} labels, creating it with the given contract if it doesn't exist yet. Returns (nil, nil) if obj carries neither label — it isn't environment-scoped.

func PatchEnvironmentAggregate

func PatchEnvironmentAggregate(
	ctx context.Context,
	c client.Client,
	env *env1alpha1.Environment,
	patchFn func(*environmentResolution.ResolvedEnvironmentSpec),
) error

PatchEnvironmentAggregate resolves env's contract, applies patchFn to the resolved spec, and re-encodes the result back onto env.Spec.Contract.

Types

This section is empty.

Directories

Path Synopsis
Package build implements the Build prerequisite mediator.
Package build implements the Build prerequisite mediator.
Package serviceunit implements the ServiceUnit prerequisite mediator.
Package serviceunit implements the ServiceUnit prerequisite mediator.

Jump to

Keyboard shortcuts

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