runtime

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CONTEXT_KEY_SUBMETAS = "submetas"

Variables

This section is empty.

Functions

func AttachSubFlowsToContext

func AttachSubFlowsToContext(flowMetas *[]dsl.SubLogicFlowMeta, 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.NodeDefine) *T) {

Types

type Activity added in v0.1.0

type Activity[Config any] struct {
	BaseActivity BaseActivity
}

为了处理Config添加的一层,这个在反射时不能被显式类型转换

func (*Activity[Config]) GetConfig added in v0.1.0

func (a *Activity[Config]) GetConfig() Config

func (*Activity[Config]) Next added in v0.1.0

func (a *Activity[Config]) Next(inputValue any, outputName string, ctx context.Context)

func (*Activity[Config]) Output added in v0.1.0

func (a *Activity[Config]) Output(inputValue any, ctx context.Context)

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

func (*ActivityJointers) GetSingleInput added in v0.1.0

func (j *ActivityJointers) GetSingleInput() *Jointer

func (*ActivityJointers) GetSingleOutput added in v0.1.0

func (j *ActivityJointers) GetSingleOutput() *Jointer

type BaseActivity

type BaseActivity struct {
	Id       string
	Jointers *ActivityJointers
	Meta     *dsl.NodeDefine
	Ctx      context.Context
}

func (*BaseActivity) Init

func (b *BaseActivity) Init(meta *dsl.NodeDefine, ctx context.Context)

func (*BaseActivity) Next

func (b *BaseActivity) 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.LogicFlowMeta, 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