fns

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0, BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTypeMeta

func AddTypeMeta(ctx context.Context, schema types.KformBlockSchema, d any) (any, error)

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 NewModuleFn

func NewModuleFn(cfg *Config) fn.BlockInstanceRunner

func NewProviderFn

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 {
	Provider   bool
	ModuleName string
	BlockName  string

	RootModuleName string
	Vars           cache.Cache[vars.Variable]
	Recorder       recorder.Recorder[record.Record]
	// used for the provider DAG run + resources run to find the provider client
	ProviderInstances cache.Cache[plugin.Provider]
	// used for the provider DAG run only
	ProviderInventory cache.Cache[types.Provider]
}

type ExecHandler

type ExecHandler struct {
	RootModuleName string
	ModuleName     string
	BlockName      string
	Vars           cache.Cache[vars.Variable]
	Recorder       recorder.Recorder[record.Record]
	// 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 module

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 Renderer

type Renderer struct {
	Vars   cache.Cache[vars.Variable]
	Schema types.KformBlockSchema
}

func (*Renderer) RenderConfigOrValue

func (r *Renderer) RenderConfigOrValue(ctx context.Context, blockName string, x any, localVars map[string]any) (any, error)

func (*Renderer) RenderValue

func (r *Renderer) RenderValue(ctx context.Context, blockName string, d any, localVars map[string]any) error

Jump to

Keyboard shortcuts

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