native

package
v0.0.0-...-98ba599 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Note: package is called 'native' because 'internal' is not an allowed package name.

Index

Constants

View Source
const (
	Name = "native"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FunctionEnv

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

FunctionEnv for executing low overhead functions, such as control flow constructs, inside the workflow engine

Note: This currently supports Golang only.

func NewFunctionEnv

func NewFunctionEnv(fns map[string]InternalFunction) *FunctionEnv

func (*FunctionEnv) Installed

func (fe *FunctionEnv) Installed() []string

Installed lists all installed functions in the internal function runtime.

func (*FunctionEnv) Invoke

func (*FunctionEnv) RegisterFn

func (fe *FunctionEnv) RegisterFn(name string, fn InternalFunction)

func (*FunctionEnv) Resolve

func (fe *FunctionEnv) Resolve(ref types.FnRef) (string, error)

type InternalFunction

type InternalFunction interface {
	Invoke(spec *types.TaskInvocationSpec) (*typedvalues.TypedValue, error)
}

An InternalFunction is a function that will be executed in the same process as the invoker.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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