Documentation ¶
Index ¶
- func AddDeploymentDependenciesFromVal(ctx Solution, resource *construct.Resource, val any) error
- func Downstream(sol Solution, rid construct.ResourceId, layer knowledgebase.DependencyLayer) ([]construct.ResourceId, error)
- func DownstreamFunctional(sol Solution, resource construct.ResourceId) ([]construct.ResourceId, error)
- func DynamicCtx(sol Solution) knowledgebase.DynamicValueContext
- func GetResourcesFromPropertyReference(ctx Solution, resource construct.ResourceId, propertyRef string) (resources []construct.ResourceId, errs error)
- func IsOperationalResourceSideEffect(sol Solution, rid, sideEffect construct.ResourceId) (bool, error)
- func Upstream(sol Solution, resource construct.ResourceId, ...) ([]construct.ResourceId, error)
- func UpstreamFunctional(sol Solution, resource construct.ResourceId) ([]construct.ResourceId, error)
- type AddDependencyDecision
- type AddResourceDecision
- type AsEngineError
- type ConfigValidationError
- type Configurer
- type DecisionRecords
- type OperationalView
- type PropertyValidationDecision
- type RawAccessView
- func (view RawAccessView) AddEdge(source, target construct.ResourceId, options ...func(*graph.EdgeProperties)) error
- func (view RawAccessView) AddEdgesFrom(g construct.Graph) error
- func (view RawAccessView) AddVertex(value *construct.Resource, options ...func(*graph.VertexProperties)) error
- func (view RawAccessView) AddVerticesFrom(g construct.Graph) error
- func (view RawAccessView) AdjacencyMap() (map[construct.ResourceId]map[construct.ResourceId]construct.Edge, error)
- func (view RawAccessView) Clone() (construct.Graph, error)
- func (view RawAccessView) Edge(source, target construct.ResourceId) (construct.ResourceEdge, error)
- func (view RawAccessView) Edges() ([]construct.Edge, error)
- func (view RawAccessView) Order() (int, error)
- func (view RawAccessView) PredecessorMap() (map[construct.ResourceId]map[construct.ResourceId]construct.Edge, error)
- func (view RawAccessView) RemoveEdge(source, target construct.ResourceId) error
- func (view RawAccessView) RemoveVertex(hash construct.ResourceId) error
- func (view RawAccessView) Size() (int, error)
- func (view RawAccessView) Traits() *graph.Traits
- func (view RawAccessView) UpdateEdge(source, target construct.ResourceId, ...) error
- func (view RawAccessView) Vertex(hash construct.ResourceId) (*construct.Resource, error)
- func (view RawAccessView) VertexWithProperties(hash construct.ResourceId) (*construct.Resource, graph.VertexProperties, error)
- type RemoveDependencyDecision
- type RemoveResourceDecision
- type ResourceConfigurer
- type SetPropertyDecision
- type Solution
- type SolveDecision
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Downstream ¶
func Downstream( sol Solution, rid construct.ResourceId, layer knowledgebase.DependencyLayer, ) ([]construct.ResourceId, error)
func DownstreamFunctional ¶
func DownstreamFunctional(sol Solution, resource construct.ResourceId) ([]construct.ResourceId, error)
func DynamicCtx ¶
func DynamicCtx(sol Solution) knowledgebase.DynamicValueContext
func GetResourcesFromPropertyReference ¶
func GetResourcesFromPropertyReference( ctx Solution, resource construct.ResourceId, propertyRef string, ) ( resources []construct.ResourceId, errs error, )
getResourcesFromPropertyReference takes a property reference and returns all the resources that are referenced by it. It does this by walking the property reference (split by #) and finding all the resources that are in the property.
func IsOperationalResourceSideEffect ¶
func IsOperationalResourceSideEffect(sol Solution, rid, sideEffect construct.ResourceId) (bool, error)
func Upstream ¶
func Upstream( sol Solution, resource construct.ResourceId, layer knowledgebase.DependencyLayer, ) ([]construct.ResourceId, error)
func UpstreamFunctional ¶
func UpstreamFunctional(sol Solution, resource construct.ResourceId) ([]construct.ResourceId, error)
Types ¶
type AddDependencyDecision ¶
type AddDependencyDecision struct { From construct.ResourceId To construct.ResourceId }
type AddResourceDecision ¶
type AddResourceDecision struct {
Resource construct.ResourceId
}
type AsEngineError ¶
type AsEngineError interface { // TryEngineError returns an EngineError if the decision is an error, otherwise nil. TryEngineError() engine_errs.EngineError }
type ConfigValidationError ¶
type ConfigValidationError struct {
PropertyValidationDecision
}
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
func (ConfigValidationError) ErrorCode ¶
func (e ConfigValidationError) ErrorCode() engine_errs.ErrorCode
func (ConfigValidationError) ToJSONMap ¶
func (e ConfigValidationError) ToJSONMap() map[string]any
func (ConfigValidationError) Unwrap ¶
func (e ConfigValidationError) Unwrap() error
type Configurer ¶
type Configurer struct {
Ctx Solution
}
func (*Configurer) ConfigureResource ¶
func (c *Configurer) ConfigureResource( resource *construct.Resource, configuration knowledgebase.Configuration, data knowledgebase.DynamicValueData, action constraints.ConstraintOperator, userInitiated bool, ) error
type DecisionRecords ¶
type DecisionRecords struct {
// contains filtered or unexported fields
}
func (*DecisionRecords) GetDecisions ¶
func (r *DecisionRecords) GetDecisions() []SolveDecision
func (*DecisionRecords) RecordDecision ¶
func (r *DecisionRecords) RecordDecision(d SolveDecision)
type OperationalView ¶
type PropertyValidationDecision ¶
type PropertyValidationDecision struct { Resource construct.ResourceId Property knowledgebase.Property Value any Error error }
func (PropertyValidationDecision) TryEngineError ¶
func (d PropertyValidationDecision) TryEngineError() engine_errs.EngineError
type RawAccessView ¶
type RawAccessView struct {
// contains filtered or unexported fields
}
func NewRawView ¶
func NewRawView(inner Solution) RawAccessView
func (RawAccessView) AddEdge ¶
func (view RawAccessView) AddEdge(source, target construct.ResourceId, options ...func(*graph.EdgeProperties)) error
func (RawAccessView) AddEdgesFrom ¶
func (view RawAccessView) AddEdgesFrom(g construct.Graph) error
func (RawAccessView) AddVertex ¶
func (view RawAccessView) AddVertex(value *construct.Resource, options ...func(*graph.VertexProperties)) error
func (RawAccessView) AddVerticesFrom ¶
func (view RawAccessView) AddVerticesFrom(g construct.Graph) error
func (RawAccessView) AdjacencyMap ¶
func (view RawAccessView) AdjacencyMap() (map[construct.ResourceId]map[construct.ResourceId]construct.Edge, error)
func (RawAccessView) Edge ¶
func (view RawAccessView) Edge(source, target construct.ResourceId) (construct.ResourceEdge, error)
func (RawAccessView) Order ¶
func (view RawAccessView) Order() (int, error)
func (RawAccessView) PredecessorMap ¶
func (view RawAccessView) PredecessorMap() (map[construct.ResourceId]map[construct.ResourceId]construct.Edge, error)
func (RawAccessView) RemoveEdge ¶
func (view RawAccessView) RemoveEdge(source, target construct.ResourceId) error
func (RawAccessView) RemoveVertex ¶
func (view RawAccessView) RemoveVertex(hash construct.ResourceId) error
func (RawAccessView) Size ¶
func (view RawAccessView) Size() (int, error)
func (RawAccessView) Traits ¶
func (view RawAccessView) Traits() *graph.Traits
func (RawAccessView) UpdateEdge ¶
func (view RawAccessView) UpdateEdge( source, target construct.ResourceId, options ...func(properties *graph.EdgeProperties), ) error
func (RawAccessView) Vertex ¶
func (view RawAccessView) Vertex(hash construct.ResourceId) (*construct.Resource, error)
func (RawAccessView) VertexWithProperties ¶
func (view RawAccessView) VertexWithProperties( hash construct.ResourceId, ) (*construct.Resource, graph.VertexProperties, error)
type RemoveDependencyDecision ¶
type RemoveDependencyDecision struct { From construct.ResourceId To construct.ResourceId }
type RemoveResourceDecision ¶
type RemoveResourceDecision struct {
Resource construct.ResourceId
}
type ResourceConfigurer ¶
type ResourceConfigurer interface { ConfigureResource( resource *construct.Resource, configuration knowledgebase.Configuration, data knowledgebase.DynamicValueData, action constraints.ConstraintOperator, userInitiated bool, ) error }
type SetPropertyDecision ¶
type SetPropertyDecision struct { Resource construct.ResourceId Property string Value any }
type Solution ¶
type Solution interface { Context() context.Context KnowledgeBase() knowledgebase.TemplateKB Constraints() *constraints.Constraints RecordDecision(d SolveDecision) GetDecisions() []SolveDecision DataflowGraph() construct.Graph DeploymentGraph() construct.Graph // OperationalView returns a graph that makes any resources or edges added operational as part of the operation. // Read operations come from the Dataflow graph. // Write operations will update both the Dataflow and Deployment graphs. OperationalView() OperationalView // RawView returns a graph that makes no changes beyond explicitly requested operations. // Read operations come from the Dataflow graph. // Write operations will update both the Dataflow and Deployment graphs. RawView() construct.Graph // GlobalTag returns the global tag for the solution context GlobalTag() string Outputs() map[string]construct.Output }
type SolveDecision ¶
type SolveDecision interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.