lifecycle

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package lifecycle provides a runtime read-surface over the maturity lifecycle (kernel/cellvocab.CellLifecycle) of the cells composing a running assembly.

The LifecycleAggregator exposes each registered cell's current declared lifecycle; consumers compute whatever "gap" they need (e.g. the maturity distribution of the running assembly). The composition root logs that distribution at startup so operators see, at a glance, whether a deployment is running experimental cells in a context that expects assets.

This is the live-cell counterpart to the static catalog CellSpec.lifecycle (devtools/catalog), which exposes declared lifecycles from on-disk metadata. Both derive from the same single source — CellMeta.Lifecycle, parsed once at NewBaseCell construction — so they never diverge.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LifecycleAggregator

type LifecycleAggregator interface {
	// Snapshot returns one entry per cell, sorted by CellID for deterministic
	// output. The aggregate summary (e.g. the lifecycle distribution across the
	// assembly) is computed by the consumer.
	Snapshot() []LifecycleEntry
}

LifecycleAggregator reports the maturity lifecycle of each cell in an assembly.

func NewLifecycleAggregator

func NewLifecycleAggregator(cells []cell.CellIdentity) LifecycleAggregator

NewLifecycleAggregator builds an aggregator over the given cells. The lifecycles are snapshotted at construction (a cell's declared lifecycle is immutable for its lifetime), so Snapshot is allocation-light and lock-free.

type LifecycleEntry

type LifecycleEntry struct {
	CellID    string
	Lifecycle cellvocab.CellLifecycle
}

LifecycleEntry pairs a cell's ID with its current declared maturity lifecycle.

Jump to

Keyboard shortcuts

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