workflows

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: 17 Imported by: 0

Documentation

Overview

package workflows exposes the workflow engine itself as a function environment to improve recursion.

Although other runtimes could also be used to proxy calls to the workflow engine, that would be an unnecessarily expensive operation. The call would pass from the workflow engine to the function environment back to the workflow engine. Shortcutting this round-trip by avoiding leaving the workflow engine, reduces the critical path of the call.

Besides the performance, recursive workflow calls happen in the context of a higher-level workflow. To avoid confusing users and cluttering external (logging) systems, this package enables these workflows to remain largely opaque to the user.

Index

Constants

View Source
const (
	PollInterval = time.Duration(100) * time.Millisecond
	Name         = "workflows"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

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

Runtime provides an abstraction of the workflow engine itself to use as a Task runtime environment.

func NewRuntime

func NewRuntime(api *api.Invocation, invocations *store.Invocations, workflows *store.Workflows) *Runtime

func (*Runtime) Invoke

func (*Runtime) InvokeWorkflow

func (rt *Runtime) InvokeWorkflow(spec *types.WorkflowInvocationSpec, opts ...fnenv.InvokeOption) (*types.WorkflowInvocation, error)

Jump to

Keyboard shortcuts

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