runtime

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PartialRequestQueue = "goflow-partial-request"
	NewRequestQueue     = "goflow-request"
)

Variables

This section is empty.

Functions

func ReadSecret

func ReadSecret(key string) (string, error)

ReadSecret reads a secret from /var/runtime/secrets or from env-var 'secret_mount_path' if set.

func StartServer

func StartServer(runtime runtime.Runtime, port int, readTimeout time.Duration, writeTimeout time.Duration) error

StartServer starts the flow function

Types

type FlowDefinitionHandler

type FlowDefinitionHandler func(flow *flow.Workflow, context *flow.Context) error

type FlowExecutor

type FlowExecutor struct {
	CallbackURL string // the callback url

	StateStore   sdk.StateStore
	DataStore    sdk.DataStore
	EventHandler sdk.EventHandler
	Logger       sdk.Logger
	Handler      FlowDefinitionHandler
	Runtime      *FlowRuntime
	// contains filtered or unexported fields
}

func (*FlowExecutor) Configure

func (fe *FlowExecutor) Configure(requestID string)

func (*FlowExecutor) GetDataStore

func (fe *FlowExecutor) GetDataStore() (sdk.DataStore, error)

func (*FlowExecutor) GetEventHandler

func (fe *FlowExecutor) GetEventHandler() (sdk.EventHandler, error)

func (*FlowExecutor) GetExecutionOption

func (fe *FlowExecutor) GetExecutionOption(operation sdk.Operation) map[string]interface{}

func (*FlowExecutor) GetFlowDefinition

func (fe *FlowExecutor) GetFlowDefinition(pipeline *sdk.Pipeline, context *sdk.Context) error

func (*FlowExecutor) GetFlowName

func (fe *FlowExecutor) GetFlowName() string

func (*FlowExecutor) GetLogger

func (fe *FlowExecutor) GetLogger() (sdk.Logger, error)

func (*FlowExecutor) GetReqAuthKey

func (fe *FlowExecutor) GetReqAuthKey() (string, error)

func (*FlowExecutor) GetStateStore

func (fe *FlowExecutor) GetStateStore() (sdk.StateStore, error)

func (*FlowExecutor) GetValidationKey

func (fe *FlowExecutor) GetValidationKey() (string, error)

func (*FlowExecutor) HandleExecutionCompletion

func (fe *FlowExecutor) HandleExecutionCompletion(data []byte) error

func (*FlowExecutor) HandleNextNode

func (fe *FlowExecutor) HandleNextNode(partial *executor.PartialState) error

func (*FlowExecutor) Init

func (fe *FlowExecutor) Init(request *runtime.Request) error

func (*FlowExecutor) LoggingEnabled

func (fe *FlowExecutor) LoggingEnabled() bool

func (*FlowExecutor) MonitoringEnabled

func (fe *FlowExecutor) MonitoringEnabled() bool

func (*FlowExecutor) ReqAuthEnabled

func (fe *FlowExecutor) ReqAuthEnabled() bool

func (*FlowExecutor) ReqValidationEnabled

func (fe *FlowExecutor) ReqValidationEnabled() bool

type FlowRuntime

type FlowRuntime struct {
	FlowName       string
	Handler        FlowDefinitionHandler
	OpenTracingUrl string
	RedisURL       string

	DataStore    sdk.DataStore
	Logger       sdk.Logger
	Concurrency  int
	ServerPort   int
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	// contains filtered or unexported fields
}

func (*FlowRuntime) CreateExecutor

func (fRuntime *FlowRuntime) CreateExecutor(req *runtime.Request) (executor.Executor, error)

func (*FlowRuntime) EnqueuePartialRequest

func (fRuntime *FlowRuntime) EnqueuePartialRequest(pr *runtime.Request) error

func (*FlowRuntime) Execute

func (fRuntime *FlowRuntime) Execute(request *runtime.Request) error

func (*FlowRuntime) Init

func (fRuntime *FlowRuntime) Init() error

func (*FlowRuntime) StartQueueWorker

func (fRuntime *FlowRuntime) StartQueueWorker() error

StartQueueWorker starts listening for request in queue

func (*FlowRuntime) StartServer

func (fRuntime *FlowRuntime) StartServer() error

StartServer starts listening for new request

Jump to

Keyboard shortcuts

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