mirror of
https://github.com/hanzoai/o11y-foundry.git
synced 2026-11-02 09:38:05 +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
16 lines
564 B
Go
16 lines
564 B
Go
package collectionagent
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/signoz/foundry/api/v1alpha1/collectionagent"
|
|
"github.com/signoz/foundry/internal/domain"
|
|
collectionagentmolding "github.com/signoz/foundry/internal/molding/collectionagent"
|
|
)
|
|
|
|
type Casting interface {
|
|
Enricher(ctx context.Context, config *collectionagent.Casting) (collectionagentmolding.MoldingEnricher, error)
|
|
Forge(ctx context.Context, config collectionagent.Casting, poursPath string) ([]domain.Material, error)
|
|
Cast(ctx context.Context, config collectionagent.Casting, poursPath string) error
|
|
}
|