fns

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInputFn

func NewInputFn(cfg *Config) fn.BlockInstanceRunner

provide and input runner, which runs per input instance

func NewLocalOrOutputFn

func NewLocalOrOutputFn(cfg *Config) fn.BlockInstanceRunner

func NewPackageFn

func NewPackageFn(cfg *Config) fn.BlockInstanceRunner

func NewProviderFn added in v0.0.3

func NewProviderFn(cfg *Config) fn.BlockInstanceRunner

func NewResourceFn

func NewResourceFn(cfg *Config) fn.BlockInstanceRunner

func NewRootFn

func NewRootFn(cfg *Config) fn.BlockInstanceRunner

Types

type Config

type Config struct {
	Kind        DagRun // inidcates if this is a regular, provider or inventory run
	PackageName string
	BlockName   string

	RootPackageName string
	VarStore        store.Storer[data.VarData]
	OutputStore     store.Storer[data.BlockData]
	Recorder        recorder.Recorder[diag.Diagnostic]
	// used for the provider DAG run + resources run to find the provider client
	ProviderInstances store.Storer[plugin.Provider]
	// hold the raw provider reference to the provider
	// used for the provider DAG run only
	Providers store.Storer[types.Provider]
	// capture all the provider configs that got rendered
	ProviderConfigs store.Storer[string]
	// used to capture all resources applied by a given provider per package
	Resources store.Storer[store.Storer[data.BlockData]]
	DryRun    bool
	Destroy   bool
}

type DagRun added in v0.0.3

type DagRun int
const (
	DagRunRegular   DagRun = iota // Regular
	DagRunProvider                // Provider
	DagRunInventory               // Inventory
)

func (DagRun) String added in v0.0.3

func (i DagRun) String() string

type ExecHandler

type ExecHandler struct {
	RootPackageName string
	PackageName     string
	BlockName       string
	VarStore        store.Storer[data.VarData]
	OutputStore     store.Storer[data.BlockData]
	Recorder        recorder.Recorder[diag.Diagnostic]
	// contains filtered or unexported fields
}

func NewExecHandler

func NewExecHandler(ctx context.Context, cfg *Config) *ExecHandler

func (*ExecHandler) BlockRun

func (r *ExecHandler) BlockRun(ctx context.Context, vertexName string, vctx *types.VertexContext) bool

func (*ExecHandler) PostRun

func (r *ExecHandler) PostRun(ctx context.Context, start, stop time.Time, success bool)

PostRun records the overall result of the package execHandler

type Initializer

type Initializer func(*Config) fn.BlockInstanceRunner

type Map

type Map interface {
	fn.BlockInstanceRunner
}

func NewMap

func NewMap(ctx context.Context, cfg *Config) Map

type Resources added in v0.0.3

type Resources struct {
	store.Storer[store.Storer[data.BlockData]]
}

func (Resources) Delete added in v0.0.3

func (r Resources) Delete(ctx context.Context, pkgName, blockName string, rn *yaml.RNode) error

func (Resources) GetItem added in v0.0.3

func (r Resources) GetItem(ctx context.Context, pkgName, blockName string, rn *yaml.RNode) *unstructured.Unstructured

Jump to

Keyboard shortcuts

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