mirror of
https://github.com/hanzoai/o11y-foundry.git
synced 2026-10-30 18:26:45 +00:00
#### Summary Introduces a per-Kind `Planner` contract so Foundry can drive multiple casting Kinds through a single pipeline. `Foundry.Forge` / `Cast` / `Gauge` become Kind-agnostic; per-Kind state (registry, moldings, casting strategy, enricher) lives in the Kind's own Planner. #### Changes - New `internal/planner` package defining the `Planner` contract. - `Foundry` holds a `Planners` dispatch map; each casting package implements the contract (`installation.Planner`, `collectionagent.Planner`). - Installation registry moves from `internal/foundry/registry.go` to `internal/casting/installation/registry.go`. - CollectionAgent Kind scaffolded: Planner + collector molding wired end-to-end. No deployment castings yet. - `MoldingKindCollector` added to `api/v1alpha1/molding_kind.go`. Related: https://github.com/SigNoz/platform-pod/issues/1971, https://github.com/SigNoz/platform-pod/issues/1972
20 lines
1.0 KiB
Go
20 lines
1.0 KiB
Go
// Package planner defines the per-Kind orchestrator contract that Foundry
|
|
// iterates against.
|
|
//
|
|
// Each Kind (Installation, CollectionAgent, ...) ships a Planner implementation
|
|
// in its own casting package. Foundry resolves a Kind to a Planner at runtime
|
|
// via the dispatch map on the Foundry struct and then drives the same set of
|
|
// verbs (Machinery, Patches, Toolers, MoldingKinds, EnrichStatus, Mold,
|
|
// MergeStatusIntoSpec, Forge, Cast) regardless of which Kind it is.
|
|
//
|
|
// Keep this package free of orchestration and side effects. It must not
|
|
// construct planners, decide which Kind runs, dispatch by Kind, execute
|
|
// tools, write files, or hold registries. The dispatch and lifecycle live
|
|
// in internal/foundry; the implementations live in internal/casting/<kind>.
|
|
//
|
|
// This package is a leaf: it is imported by both internal/foundry and every
|
|
// internal/casting/<kind> package, so it must not import any of them. The
|
|
// only Foundry packages this package may import are api/v1alpha1,
|
|
// internal/domain, and internal/tooler.
|
|
package planner
|