nodeprocessor

package
v0.3.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWorkflowId

func GetWorkflowId(ctx context.Context) string

func NewApplyNode

func NewApplyNode(node *domain.WorkflowNode) *applyNode

func NewConditionNode

func NewConditionNode(node *domain.WorkflowNode) *conditionNode

func NewDeployNode

func NewDeployNode(node *domain.WorkflowNode) *deployNode

func NewNotifyNode

func NewNotifyNode(node *domain.WorkflowNode) *notifyNode

func NewStartNode

func NewStartNode(node *domain.WorkflowNode) *startNode

func NewWorkflowProcessor

func NewWorkflowProcessor(workflow *domain.Workflow) *workflowProcessor

func WithWorkflowId

func WithWorkflowId(ctx context.Context, id string) context.Context

Types

type Logger

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

func NewLogger

func NewLogger(node *domain.WorkflowNode) *Logger

func (*Logger) AddOutput

func (l *Logger) AddOutput(ctx context.Context, title, content string, err ...string)

func (*Logger) Log

func (l *Logger) Log(ctx context.Context) *domain.RunLog

type NodeProcessor

type NodeProcessor interface {
	Run(ctx context.Context) error
	Log(ctx context.Context) *domain.RunLog
	AddOutput(ctx context.Context, title, content string, err ...string)
}

func GetProcessor

func GetProcessor(node *domain.WorkflowNode) (NodeProcessor, error)

type SettingRepository

type SettingRepository interface {
	GetByName(ctx context.Context, name string) (*domain.Setting, error)
}

type WorkflowOutputRepository

type WorkflowOutputRepository interface {
	// 查询节点输出
	Get(ctx context.Context, nodeId string) (*domain.WorkflowOutput, error)

	// 查询申请节点的证书
	GetCertificate(ctx context.Context, nodeId string) (*domain.Certificate, error)

	// 保存节点输出
	Save(ctx context.Context, output *domain.WorkflowOutput, certificate *domain.Certificate, cb func(id string) error) error
}

Jump to

Keyboard shortcuts

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