surveyor

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package surveyor is the Raven framework: discovery plugins that inspect an environment and return Saga fragments, which are merged so the descriptor can write itself.

Odin's ravens, Huginn and Muninn, fly the world and report back what they see.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(model *saga.Model, frag saga.Fragment)

Apply merges a fragment into an existing model, upserting components by name.

func MergeFragments

func MergeFragments(frags ...saga.Fragment) saga.Fragment

MergeFragments combines fragments into one, deduplicating components by name and unioning each component's surface (repositories, images, hosts, infrastructure).

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry holds surveyors keyed by name.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns an empty registry.

func (*Registry) Get

func (r *Registry) Get(name string) (plugin.Surveyor, bool)

Get returns the named surveyor, if registered.

func (*Registry) Names

func (r *Registry) Names() []string

Names returns the registered surveyor names in sorted order.

func (*Registry) Register

func (r *Registry) Register(s plugin.Surveyor)

Register adds a surveyor, keyed by its Info().Name.

func (*Registry) Run

func (r *Registry) Run(ctx context.Context, requests []Request) (saga.Fragment, error)

Run executes each request in order and merges the resulting fragments. Errors (unknown surveyor, survey failure) are collected and returned alongside whatever was discovered.

type Request

type Request struct {
	Surveyor string
	Scope    plugin.SurveyScope
}

Request asks a named surveyor to survey a scope.

Jump to

Keyboard shortcuts

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