graph

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ImplicitRefPrefix = "$kusion_path."
)

Variables

View Source
var MustImplicitReplaceFun = func(resourceIndex map[string]*apiv1.Resource, refPath string) (reflect.Value, v1.Status) {
	return implicitReplaceFun(true, resourceIndex, refPath)
}
View Source
var OptionalImplicitReplaceFun = func(resourceIndex map[string]*apiv1.Resource, refPath string) (reflect.Value, v1.Status) {
	return implicitReplaceFun(false, resourceIndex, refPath)
}

Functions

func NewBaseNode

func NewBaseNode(id string) (*baseNode, v1.Status)

func ReplaceImplicitRef added in v0.7.4

func ReplaceImplicitRef(
	v reflect.Value,
	resourceIndex map[string]*apiv1.Resource,
	replaceFun func(map[string]*apiv1.Resource, string) (reflect.Value, v1.Status),
) ([]string, reflect.Value, v1.Status)

func ReplaceRef added in v0.7.4

func ReplaceRef(
	v reflect.Value,
	resourceIndex map[string]*apiv1.Resource,
	repImplDepFunc func(map[string]*apiv1.Resource, string) (reflect.Value, v1.Status),
) ([]string, reflect.Value, v1.Status)

func ReplaceSecretRef added in v0.7.4

func ReplaceSecretRef(v reflect.Value) ([]string, reflect.Value, v1.Status)

Types

type ExecutableNode

type ExecutableNode interface {
	Execute(operation *models.Operation) v1.Status
}

type ResourceNode

type ResourceNode struct {
	Action models.ActionType
	// contains filtered or unexported fields
}

func NewResourceNode

func NewResourceNode(key string, state *apiv1.Resource, action models.ActionType) (*ResourceNode, v1.Status)

func (*ResourceNode) Execute

func (rn *ResourceNode) Execute(operation *models.Operation) (s v1.Status)

func (ResourceNode) Hashcode

func (b ResourceNode) Hashcode() interface{}

func (ResourceNode) Name

func (b ResourceNode) Name() string

func (*ResourceNode) PreExecute added in v0.7.4

func (rn *ResourceNode) PreExecute(o *models.Operation) v1.Status

func (*ResourceNode) State

func (rn *ResourceNode) State() *apiv1.Resource

type RootNode

type RootNode struct{}

func (*RootNode) Hashcode

func (r *RootNode) Hashcode() interface{}

func (*RootNode) Name

func (r *RootNode) Name() string

Jump to

Keyboard shortcuts

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