runtime

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachSubFlowsToContext

func AttachSubFlowsToContext(flowMetas *[]dsl.LogicFlowDefine, ctx context.Context) context.Context

func FirstUpper

func FirstUpper(s string) string

FirstUpper 字符串首字母大写

func RegisterActivity

func RegisterActivity(name string, activity interface{})

func RegisterActivity[Config any, T Activity[Config]](name string, factory func(meta *dsl.ActivityDefine) *T) {

Types

type ActivityJointers

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

func (*ActivityJointers) GetInput

func (j *ActivityJointers) GetInput(name string) *Jointer

func (*ActivityJointers) GetInputById

func (j *ActivityJointers) GetInputById(id string) *Jointer

func (*ActivityJointers) GetOutput

func (j *ActivityJointers) GetOutput(name string) *Jointer

func (*ActivityJointers) GetOutputById

func (j *ActivityJointers) GetOutputById(id string) *Jointer

type BaseActivity

type BaseActivity[Config any] struct {
	Id       string
	Jointers *ActivityJointers
	Meta     *dsl.ActivityDefine
	Ctx      context.Context
}

func (*BaseActivity[Config]) GetConfig

func (b *BaseActivity[Config]) GetConfig() Config

func (*BaseActivity[T]) Init

func (b *BaseActivity[T]) Init(meta *dsl.ActivityDefine, ctx context.Context)

func (*BaseActivity[Config]) Next

func (b *BaseActivity[Config]) Next(inputValue interface{}, outputName string)

type InputHandler

type InputHandler = func(inputValue any, ctx context.Context)

type Jointer

type Jointer struct {
	Id   string
	Name string
	// contains filtered or unexported fields
}

func (*Jointer) Connect

func (j *Jointer) Connect(inuptHandler InputHandler)

func (*Jointer) Push

func (j *Jointer) Push(inputValue any, ctx context.Context)

type LogicFlow

type LogicFlow struct {
	Id       string
	Jointers *ActivityJointers
	// contains filtered or unexported fields
}

func NewLogicflow

func NewLogicflow(flowMeta dsl.LogicFlowDefine, ctx context.Context) *LogicFlow

ctx用于传递value,minions.CONTEXT_KEY_SUBMETAS 对应*[]dsl.LogicFlowDefine, 子编排metas

Jump to

Keyboard shortcuts

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