kanister

package
v0.0.0-...-df65c40 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultVersion = "v0.0.0"
)

Variables

This section is empty.

Functions

func Register

func Register(f Func) error

Register allows Funcs to be referenced by User Defined YAMLs

func RegisterVersion

func RegisterVersion(f Func, v string) error

RegisterVersion allows a Kanister Function to be registered with the given version

func RegisteredFunctions

func RegisteredFunctions() map[string]struct{}

Types

type Func

type Func interface {
	Name() string
	RequiredArgs() []string
	Arguments() []string
	Exec(context.Context, param.TemplateParams, map[string]interface{}) (map[string]interface{}, error)
	ExecutionProgress() (crv1alpha1.PhaseProgress, error)
}

Func allows custom actions to be executed.

func KanisterFuncForName

func KanisterFuncForName(funcName, version string) Func

type Phase

type Phase struct {
	// contains filtered or unexported fields
}

Phase is an atomic unit of execution.

func GetDeferPhase

func GetDeferPhase(bp crv1alpha1.Blueprint, action, version string, tp param.TemplateParams) (*Phase, error)

func GetPhases

func GetPhases(bp crv1alpha1.Blueprint, action, version string, tp param.TemplateParams) ([]*Phase, error)

GetPhases renders the returns a list of Phases with pre-rendered arguments.

func (*Phase) Exec

func (p *Phase) Exec(ctx context.Context, bp crv1alpha1.Blueprint, action string, tp param.TemplateParams) (map[string]interface{}, error)

Exec renders the argument templates in this Phase's Func and executes with those arguments.

func (*Phase) Name

func (p *Phase) Name() string

Name returns the name of this phase.

func (*Phase) Objects

func (p *Phase) Objects() map[string]crv1alpha1.ObjectReference

Objects returns the phase object references

func (*Phase) Progress

func (p *Phase) Progress() (crv1alpha1.PhaseProgress, error)

Progress return execution progress of the phase.

func (*Phase) Validate

func (p *Phase) Validate(args map[string]interface{}) error

Validate gets the provided arguments from a blueprint and verifies that the required arguments are present

Directories

Path Synopsis
apis
cr/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
aws
ec2
rds
azure
TODO: Switch to using the latest azure sdk and remove nolint.
TODO: Switch to using the latest azure sdk and remove nolint.
client
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/cr/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/cr/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
controllers
Package for a kanister operator
Package for a kanister operator
cli
snapshot/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package logsafe provides a framework for constructing commands that are safe for logging, where each token is considered unsafe and redacted, unless explicitly specified.
Package logsafe provides a framework for constructing commands that are safe for logging, where each token is considered unsafe and redacted, unless explicitly specified.
testing

Jump to

Keyboard shortcuts

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