Documentation
¶
Index ¶
- func DiscoverConfigurationPathsRecursively(rootPath string) ([]string, error)
- func ResolveConfigurationPath(path string) (string, error)
- type DependencyError
- type DependencyGraph
- type DiscoveryError
- type EnvironmentDefinition
- type HealthCheckDefinition
- type ManeuverDefinition
- type NodeConfiguration
- type NodeReference
- type NodeRole
- type OrchestrationNode
- type ReactorBlueprint
- type ReactorDefinition
- type ReactorProvider
- type SignalRoutingError
- type SquadronNode
- func (squadron *SquadronNode) BuildEffectiveEnvironmentByName(environmentName string, parentEnvironment EnvironmentDefinition) (EnvironmentDefinition, error)
- func (squadron *SquadronNode) CollectDescendantNodes() []OrchestrationNode
- func (squadron *SquadronNode) ExecuteManeuverByName(maneuverName string) ([]string, error)
- func (squadron *SquadronNode) GetDependencies() []string
- func (squadron *SquadronNode) GetID() string
- func (squadron *SquadronNode) GetPath() string
- func (squadron *SquadronNode) GetRole() NodeRole
- func (squadron *SquadronNode) GetSubordinates() []OrchestrationNode
- func (squadron *SquadronNode) GetTags() []string
- func (squadron *SquadronNode) ResolveSubordinateByID(subordinateID string) (OrchestrationNode, error)
- type UnitNode
- func (unit *UnitNode) BuildEffectiveEnvironmentByName(environmentName string, parentEnvironment EnvironmentDefinition) (EnvironmentDefinition, error)
- func (unit *UnitNode) CollectDescendantNodes() []OrchestrationNode
- func (unit *UnitNode) ExecuteManeuverByName(maneuverName string) ([]string, error)
- func (unit *UnitNode) GetDependencies() []string
- func (unit *UnitNode) GetID() string
- func (unit *UnitNode) GetPath() string
- func (unit *UnitNode) GetRole() NodeRole
- func (unit *UnitNode) GetSubordinates() []OrchestrationNode
- func (unit *UnitNode) GetTags() []string
- func (unit *UnitNode) ResolveSubordinateByID(subordinateID string) (OrchestrationNode, error)
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverConfigurationPathsRecursively ¶
DiscoverConfigurationPathsRecursively scans for supported node configuration files.
func ResolveConfigurationPath ¶
ResolveConfigurationPath returns the best config file under a directory.
Types ¶
type DependencyError ¶
DependencyError indicates dependency graph issues.
func (*DependencyError) Error ¶
func (errorValue *DependencyError) Error() string
func (*DependencyError) Unwrap ¶
func (errorValue *DependencyError) Unwrap() error
type DependencyGraph ¶
type DependencyGraph struct {
// contains filtered or unexported fields
}
DependencyGraph stores nodes and dependency edges.
Edges are stored as dependencyID -> dependentID.
func BuildDependencyGraph ¶
func BuildDependencyGraph(nodes []OrchestrationNode) (*DependencyGraph, error)
BuildDependencyGraph constructs and validates a graph from orchestration nodes.
func (*DependencyGraph) ResolveStartupOrder ¶
func (graph *DependencyGraph) ResolveStartupOrder() ([]OrchestrationNode, error)
ResolveStartupOrder returns a stable topological order.
func (*DependencyGraph) ResolveStartupWaves ¶
func (graph *DependencyGraph) ResolveStartupWaves() ([][]OrchestrationNode, error)
ResolveStartupWaves returns dependency-safe execution groups.
type DiscoveryError ¶
DiscoveryError indicates configuration discovery failures.
func (*DiscoveryError) Error ¶
func (errorValue *DiscoveryError) Error() string
func (*DiscoveryError) Unwrap ¶
func (errorValue *DiscoveryError) Unwrap() error
type EnvironmentDefinition ¶
type EnvironmentDefinition struct {
Name string `yaml:"name"`
Files []string `yaml:"files"`
Variables []string `yaml:"variables"`
}
EnvironmentDefinition defines inherited environment files and variables.
type HealthCheckDefinition ¶
type HealthCheckDefinition struct {
Test []string `yaml:"test"`
Interval time.Duration `yaml:"interval"`
Timeout time.Duration `yaml:"timeout"`
Retries int `yaml:"retries"`
}
HealthCheckDefinition defines subordinate readiness checks.
type ManeuverDefinition ¶
type ManeuverDefinition struct {
Call string `yaml:"call"`
Description string `yaml:"description"`
Action []string `yaml:"action"`
}
ManeuverDefinition declares an executable maneuver.
type NodeConfiguration ¶
type NodeConfiguration struct {
Role NodeRole `yaml:"role"`
ID string `yaml:"id"`
Binary string `yaml:"binary"`
Reactor ReactorDefinition `yaml:"reactor"`
Manifest []NodeReference `yaml:"manifest"`
Maneuvers []ManeuverDefinition `yaml:"maneuvers"`
}
NodeConfiguration is a YAML representation for squadron and unit configs.
type NodeReference ¶
type NodeReference struct {
ID string `yaml:"id"`
Path string `yaml:"path"`
Tags []string `yaml:"tags"`
After []string `yaml:"after"`
HealthCheck *HealthCheckDefinition `yaml:"healthcheck"`
}
NodeReference declares one subordinate entry in a squadron manifest.
type OrchestrationNode ¶
type OrchestrationNode interface {
GetID() string
GetRole() NodeRole
GetPath() string
GetTags() []string
GetDependencies() []string
GetSubordinates() []OrchestrationNode
ResolveSubordinateByID(subordinateID string) (OrchestrationNode, error)
CollectDescendantNodes() []OrchestrationNode
BuildEffectiveEnvironmentByName(
environmentName string,
parentEnvironment EnvironmentDefinition,
) (EnvironmentDefinition, error)
ExecuteManeuverByName(maneuverName string) ([]string, error)
}
OrchestrationNode is the common node behavior contract.
type ReactorBlueprint ¶
type ReactorBlueprint struct {
EnvironmentName string `yaml:"env"`
Path string `yaml:"path"`
Action []string `yaml:"action"`
}
ReactorBlueprint maps an environment to a path or inline action.
type ReactorDefinition ¶
type ReactorDefinition struct {
Provider ReactorProvider `yaml:"provider"`
Network string `yaml:"network"`
ContextPath string `yaml:"context"`
Blueprints []ReactorBlueprint `yaml:"blueprints"`
Environments []EnvironmentDefinition `yaml:"environments"`
}
ReactorDefinition configures node runtime behavior.
type ReactorProvider ¶
type ReactorProvider string
ReactorProvider identifies the runtime execution provider.
const ( // ReactorProviderTilt identifies Tilt-driven execution. ReactorProviderTilt ReactorProvider = "tilt" // ReactorProviderNative identifies direct command execution. ReactorProviderNative ReactorProvider = "native" )
type SignalRoutingError ¶
SignalRoutingError indicates failures while routing a signal command.
func (*SignalRoutingError) Error ¶
func (errorValue *SignalRoutingError) Error() string
func (*SignalRoutingError) Unwrap ¶
func (errorValue *SignalRoutingError) Unwrap() error
type SquadronNode ¶
type SquadronNode struct {
ID string
Path string
Tags []string
After []string
Reactor ReactorDefinition
Maneuvers []ManeuverDefinition
Subordinates []OrchestrationNode
}
SquadronNode models a recursive orchestration node.
func (*SquadronNode) BuildEffectiveEnvironmentByName ¶
func (squadron *SquadronNode) BuildEffectiveEnvironmentByName( environmentName string, parentEnvironment EnvironmentDefinition, ) (EnvironmentDefinition, error)
func (*SquadronNode) CollectDescendantNodes ¶
func (squadron *SquadronNode) CollectDescendantNodes() []OrchestrationNode
func (*SquadronNode) ExecuteManeuverByName ¶
func (squadron *SquadronNode) ExecuteManeuverByName(maneuverName string) ([]string, error)
func (*SquadronNode) GetDependencies ¶
func (squadron *SquadronNode) GetDependencies() []string
func (*SquadronNode) GetID ¶
func (squadron *SquadronNode) GetID() string
func (*SquadronNode) GetPath ¶
func (squadron *SquadronNode) GetPath() string
func (*SquadronNode) GetRole ¶
func (squadron *SquadronNode) GetRole() NodeRole
func (*SquadronNode) GetSubordinates ¶
func (squadron *SquadronNode) GetSubordinates() []OrchestrationNode
func (*SquadronNode) GetTags ¶
func (squadron *SquadronNode) GetTags() []string
func (*SquadronNode) ResolveSubordinateByID ¶
func (squadron *SquadronNode) ResolveSubordinateByID(subordinateID string) (OrchestrationNode, error)
type UnitNode ¶
type UnitNode struct {
ID string
Path string
Tags []string
After []string
Reactor ReactorDefinition
Maneuvers []ManeuverDefinition
}
UnitNode models a leaf execution node.
func (*UnitNode) BuildEffectiveEnvironmentByName ¶
func (unit *UnitNode) BuildEffectiveEnvironmentByName( environmentName string, parentEnvironment EnvironmentDefinition, ) (EnvironmentDefinition, error)
func (*UnitNode) CollectDescendantNodes ¶
func (unit *UnitNode) CollectDescendantNodes() []OrchestrationNode
func (*UnitNode) ExecuteManeuverByName ¶
func (*UnitNode) GetDependencies ¶
func (*UnitNode) GetSubordinates ¶
func (unit *UnitNode) GetSubordinates() []OrchestrationNode
func (*UnitNode) ResolveSubordinateByID ¶
func (unit *UnitNode) ResolveSubordinateByID(subordinateID string) (OrchestrationNode, error)
type ValidationError ¶
ValidationError indicates invalid domain data.
func (*ValidationError) Error ¶
func (errorValue *ValidationError) Error() string
func (*ValidationError) Unwrap ¶
func (errorValue *ValidationError) Unwrap() error