registry

package
v0.0.0-...-d1f8b28 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldsForNode

func FieldsForNode(n Node) logrus.Fields

func ResolveConfig

func ResolveConfig(resolver Resolver, config api.ReleaseBuildConfiguration) (api.ReleaseBuildConfiguration, error)

ResolveConfig uses a resolver to resolve an entire ci-operator config

func Validate

func Validate(stepsByName ReferenceByName, chainsByName ChainByName, workflowsByName WorkflowByName, observersByName ObserverByName) error

Validate verifies the internal consistency of steps, chains, and workflows. A superset of this validation is performed later when actual test configurations are resolved.

Types

type ChainByName

type ChainByName map[string]api.RegistryChain

type Node

type Node interface {
	// Name returns the name of the registry element a Node refers to
	Name() string
	// Type returns the type of the registry element a Node refers to
	Type() Type
	// Ancestors returns a set of nodes containing the names of all of the node's ancestors
	Ancestors() []Node
	// Descendants returns a set of nodes containing the names of all of the node's descendants
	Descendants() []Node
	// Parents returns a set of nodes containing the names of all the node's parents
	Parents() []Node
	// Children returns a set of nodes containing the names of all the node's children
	Children() []Node
}

Node is an interface that allows a user to identify ancestors and descendants of a step registry element

type NodeByName

type NodeByName struct {
	References map[string]Node
	Chains     map[string]Node
	Workflows  map[string]Node
	Observers  map[string]Node
}

NodeByName provides a mapping from node name to the Node interface

func NewGraph

func NewGraph(stepsByName ReferenceByName, chainsByName ChainByName, workflowsByName WorkflowByName, observersByName ObserverByName) (NodeByName, error)

NewGraph returns a NodeByType map representing the provided step references, chains, and workflows as a directed graph.

type ObserverByName

type ObserverByName map[string]api.Observer

type ReferenceByName

type ReferenceByName map[string]api.LiteralTestStep

type Resolver

type Resolver interface {
	Resolve(name string, config api.MultiStageTestConfiguration) (api.MultiStageTestConfigurationLiteral, error)
	ResolveWorkflow(name string) (api.MultiStageTestConfigurationLiteral, error)
	ResolveChain(name string) (api.RegistryChain, error)
}

func NewResolver

func NewResolver(stepsByName ReferenceByName, chainsByName ChainByName, workflowsByName WorkflowByName, observersByName ObserverByName) Resolver

type Type

type Type int

Type identifies the type of registry element a Node refers to

const (
	Workflow Type = iota
	Chain
	Reference
	Observer
)

type WorkflowByName

type WorkflowByName map[string]api.MultiStageTestConfiguration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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