base

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppNamespaceContextKey contextKey = "app-ns"
)

Variables

This section is empty.

Functions

func GetAppNamespace

func GetAppNamespace(ctx context.Context) string

func SetAppNamespace

func SetAppNamespace(ctx context.Context, ns string) context.Context

Types

type BaseNode

type BaseNode struct {
	Ref arcadiav1alpha1.TypedObjectReference
	// contains filtered or unexported fields
}

func NewBaseNode

func NewBaseNode(appNamespace, nodeName string, ref arcadiav1alpha1.TypedObjectReference) BaseNode

func (*BaseNode) GetNextNode

func (c *BaseNode) GetNextNode() []Node

func (*BaseNode) GetPrevNode

func (c *BaseNode) GetPrevNode() []Node

func (*BaseNode) Group

func (c *BaseNode) Group() string

func (*BaseNode) Init

func (c *BaseNode) Init(_ context.Context, _ dynamic.Interface, _ map[string]any) error

func (*BaseNode) Kind

func (c *BaseNode) Kind() string

func (*BaseNode) Name

func (c *BaseNode) Name() string

func (*BaseNode) RefName

func (c *BaseNode) RefName() string

func (*BaseNode) RefNamespace

func (c *BaseNode) RefNamespace() string

func (*BaseNode) Run

func (c *BaseNode) Run(_ context.Context, _ dynamic.Interface, _ map[string]any) (map[string]any, error)

func (*BaseNode) SetNextNode

func (c *BaseNode) SetNextNode(nodes ...Node)

func (*BaseNode) SetPrevNode

func (c *BaseNode) SetPrevNode(nodes ...Node)

type Input

type Input struct {
	BaseNode
}

func NewInput

func NewInput(baseNode BaseNode) *Input

func (*Input) Run

func (c *Input) Run(ctx context.Context, _ dynamic.Interface, args map[string]any) (map[string]any, error)

type Node

type Node interface {
	Name() string
	Group() string
	Kind() string
	RefName() string
	RefNamespace() string
	Init(ctx context.Context, cli dynamic.Interface, args map[string]any) error
	Run(ctx context.Context, cli dynamic.Interface, args map[string]any) (map[string]any, error)
	SetPrevNode(nodes ...Node)
	SetNextNode(nodes ...Node)
	GetPrevNode() []Node
	GetNextNode() []Node
}

type Output

type Output struct {
	BaseNode
}

func NewOutput

func NewOutput(baseNode BaseNode) *Output

func (*Output) Run

func (c *Output) Run(_ context.Context, _ dynamic.Interface, args map[string]any) (map[string]any, error)

Jump to

Keyboard shortcuts

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