Documentation
¶
Overview ¶
Note: package is called 'native' because 'internal' is not an allowed package name.
Index ¶
- Constants
- type FunctionEnv
- func (fe *FunctionEnv) Installed() []string
- func (fe *FunctionEnv) Invoke(spec *types.TaskInvocationSpec, opts ...fnenv.InvokeOption) (*types.TaskInvocationStatus, error)
- func (fe *FunctionEnv) RegisterFn(name string, fn InternalFunction)
- func (fe *FunctionEnv) Resolve(ref types.FnRef) (string, error)
- func (fe *FunctionEnv) ResolveMultizone(ref types.FnRef) ([]string, error)
- type InternalFunction
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 (fe *FunctionEnv) Invoke(spec *types.TaskInvocationSpec, opts ...fnenv.InvokeOption) (*types.TaskInvocationStatus, error)
func (*FunctionEnv) RegisterFn ¶
func (fe *FunctionEnv) RegisterFn(name string, fn InternalFunction)
func (*FunctionEnv) ResolveMultizone ¶
func (fe *FunctionEnv) ResolveMultizone(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.
Click to show internal directories.
Click to hide internal directories.