model

package
v0.0.2-beta Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionDef

type ActionDef struct {
	Id           int            `json:"id"`
	Type         string         `json:"type"`
	Name         string         `json:"name"`
	InputParams  map[string]any `json:"parameters"`
	Next         map[string]int `json:"next"`
	Expression   string         `json:"expression"`
	Join         int            `json:"join"`
	DelaySeconds int            `json:"delaySeconds"`
	Event        string         `json:"event"`
}

type ActionExecutionRequest

type ActionExecutionRequest struct {
	WorkflowName string `json:"wfName"`
	TaskName     string `json:"taskName"`
	FlowId       string `json:"flowId"`
	ActionId     int    `json:"actionId"`
	TryNumber    int    `json:"tryNumber"`
}

type FlowContext

type FlowContext struct {
	Id            string         `json:"id"`
	CurrentAction int            `json:"currentAction"`
	Data          map[string]any `json:"data"`
	State         FlowState      `json:"flowState"`
	TTL           uint64         `json:"ttl"`
	Event         string         `json:"event"`
}

type FlowState

type FlowState string
const COMPLETED FlowState = "C"
const FAILED FlowState = "F"
const PAUSED FlowState = "P"
const RUNNING FlowState = "R"
const WAITING_DELAY FlowState = "WD"
const WAITING_EVENT FlowState = "WE"

type RetryPolicy

type RetryPolicy string
const RETRY_POLICY_BACKOFF RetryPolicy = "BACKOFF"
const RETRY_POLICY_FIXED RetryPolicy = "FIXED"

type TaskDef

type TaskDef struct {
	Name              string      `json:"name"`
	RetryCount        int         `json:"retry_count"`
	RetryAfterSeconds int         `json:"retry_after_seconds"`
	RetryPolicy       RetryPolicy `json:"retry_policy"`
	TimeoutSeconds    int         `json:"timeout_seconds"`
}

type Workflow

type Workflow struct {
	Name       string      `json:"name"`
	RootAction int         `json:"rootAction"`
	Actions    []ActionDef `json:"actions"`
	OnFailure  string      `json:"onFailure"`
	OnSuccess  string      `json:"onSuccess"`
}

type WorkflowEvent

type WorkflowEvent struct {
	Name   string `json:"name"`
	FlowId string `json:"flowId"`
	Event  string `json:"event"`
}

type WorkflowRunRequest

type WorkflowRunRequest struct {
	Name  string         `json:"name"`
	Input map[string]any `json:"input"`
}

Jump to

Keyboard shortcuts

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