assembly

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package assembly is the graph-native production boundary between an immutable config plan and the executable plugins selected for that plan.

The package deliberately does not discover implementations, parse command line flags, or fall back to a legacy binding. Callers supply one exact, graph-scoped Assembly assembled from their plugin catalogs. Preflight rejects missing, excess, or ambiguous factories, services, and secret providers before graph/runtime is allowed to mount the first element or resolve the first secret.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Launch

Launch performs exact resource-free Preflight and then mounts only the resulting sealed plan. There is no legacy serve/binding fallback. Callers that need to inspect or approve identities before acquisition should call Preflight and PreparedPlan.Mount separately.

func Preflight

func Preflight(
	ctx context.Context,
	plan *graphconfig.Plan,
	assembly Assembly,
) (*graphruntime.PreparedPlan, error)

Preflight converts an explicit plugin assembly into the registries consumed by graph/runtime.PreparePlan and returns its sealed handoff. It invokes only resource-free metadata operations (including Factory.Descriptor); factory Mount and secret Provider.Resolve remain behind PreparedPlan.Mount.

Types

type Assembly

type Assembly struct {
	Implementations []graphruntime.FactoryRegistration
	Dependencies    []Dependency
	SecretCatalog   *graphsecret.Document
	SecretProviders []SecretProvider
}

Assembly is the complete executable inventory for exactly one config.Plan. It is intentionally a slice-based contribution surface: independent plugin catalogs can compose entries without a central implementation switch, while Preflight retains enough information to detect duplicate contributions.

SecretCatalog contains provider names and non-secret locators, but never credential values. It must be the exact graph-scoped document whose private fingerprint was frozen into Plan.

type Catalog

type Catalog struct {
	Implementations []graphruntime.FactoryRegistration
	Dependencies    []Dependency
	SecretProviders []SecretProvider
}

Catalog is a broad, explicit set of executable plugin contributions. It is suitable for process startup and config discovery, but is not itself mount authority. Select reduces it to the exact graph-scoped Assembly frozen by a Plan; Preflight rejects any manually constructed Assembly that is broader.

func (Catalog) Discovery

func (catalog Catalog) Discovery() (*graphconfig.StaticDiscovery, error)

Discovery validates the whole catalog and returns a metadata-only snapshot for config.Create. It calls Factory.Descriptor but never Factory.Mount, SecretProvider.Resolve, or a dependency service.

func (Catalog) Select

func (catalog Catalog) Select(
	plan *graphconfig.Plan,
	secretCatalog *graphsecret.Document,
) (Assembly, error)

Select validates the whole catalog and reduces it to the exact executable contributions named by plan. The supplied secret catalog is cloned and must match the private fingerprint frozen by config.Create. Unselected catalog entries are not copied into the returned Assembly and therefore grant no ambient mount authority.

type Dependency

type Dependency struct {
	Name         string
	Artifact     inspect.ArtifactIdentity
	Scope        graphconfig.DependencyScope
	Service      any
	RuntimeOwned bool
}

Dependency binds one exact service implementation selected during plan creation. Process-scoped dependencies carry their service through resource-free preflight. Mount-scoped dependencies attest only immutable metadata here and receive their service through PreparedMountOptions. RuntimeOwned is retained for the built-in graph/runtime coeffects, whose mount-scoped values are constructed internally rather than supplied by a caller overlay.

func StandardDependencies

func StandardDependencies() []Dependency

StandardDependencies returns independent, deterministic catalog entries for graph/runtime's built-in mount-scoped coeffects. Catalog.Select will retain only the names frozen into a particular plan.

func StandardDependency

func StandardDependency(name string) (Dependency, bool)

StandardDependency returns one built-in runtime coeffect contribution.

type SecretProvider

type SecretProvider struct {
	Name     string
	Artifact inspect.ArtifactIdentity
	Provider graphsecret.Provider
}

SecretProvider binds one provider implementation to the provider name used by the graph-scoped secret catalog. Provider.Resolve is never called by Preflight.

Jump to

Keyboard shortcuts

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