builtin

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ProviderName is provider name.
	ProviderName = "builtin"
	// ResumeTimeStamp is resume time stamp.
	ResumeTimeStamp = "resumeTimeStamp"
	// SuspendTimeStamp is suspend time stamp.
	SuspendTimeStamp = "suspendTimeStamp"
)

Variables

This section is empty.

Functions

func Break

func Break(_ context.Context, params *ActionParams) (*any, error)

Break let workflow terminate.

func Fail

func Fail(_ context.Context, params *ActionParams) (*any, error)

Fail let the step fail, its status is failed and reason is Action

func GetProviders

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders returns the cue providers.

func GetTemplate

func GetTemplate() string

GetTemplate returns the cue template.

func Message

func Message(_ context.Context, params *ActionParams) (*any, error)

Message writes message to step status, note that the message will be overwritten by the next message.

func Suspend

func Suspend(_ context.Context, params *SuspendParams) (*any, error)

Suspend let the step suspend, its status is suspending and reason is Suspend

func Wait

func Wait(_ context.Context, params *WaitParams) (*any, error)

Wait let workflow wait.

Types

type ActionParams

type ActionParams = providertypes.Params[ActionVars]

ActionParams .

type ActionVars

type ActionVars struct {
	Message string `json:"message,omitempty"`
}

ActionVars .

type SuspendParams

type SuspendParams = providertypes.Params[SuspendVars]

SuspendParams .

type SuspendVars

type SuspendVars struct {
	Duration string `json:"duration,omitempty"`
	ActionVars
}

SuspendVars .

type VarParams

type VarParams = providertypes.Params[VarVars]

VarParams .

type VarReturnVars

type VarReturnVars struct {
	Value any `json:"value"`
}

VarReturnVars .

type VarReturns

type VarReturns = providertypes.Returns[VarReturnVars]

VarReturns .

func DoVar

func DoVar(_ context.Context, params *VarParams) (*VarReturns, error)

DoVar get & put variable from context.

type VarVars

type VarVars struct {
	Method string `json:"method"`
	Path   string `json:"path"`
	Value  any    `json:"value"`
}

VarVars .

type WaitParams

type WaitParams = providertypes.Params[WaitVars]

WaitParams .

type WaitVars

type WaitVars struct {
	Continue bool `json:"continue"`
	ActionVars
}

WaitVars .

Jump to

Keyboard shortcuts

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