metadata

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataScheduleID           string = "scheduleId"
	MetadataScheduleWorkflowName string = "scheduleWorkflowName"
	MetadataScheduleInput        string = "scheduleInput"
)
View Source
const (
	SearchAttributeDateTimeType    string = "datetime"
	SearchAttributeKeywordListType string = "keywordlist"
	SearchAttributeKeywordType     string = "keyword"
	SearchAttributeTextType        string = "text"
	SearchAttributeIntType         string = "int"
	SearchAttributeDoubleType      string = "double"
	SearchAttributeBooleanType     string = "bool"
)
View Source
const MaxHistoryLengthAttribute string = "canMaxHistoryLength"
View Source
const MetadataActvitiyOptions string = "activityOptions"
View Source
const MetadataSearchAttribute string = "searchAttributes"

Variables

View Source
var ErrInvalidType = fmt.Errorf("invalid type")

Functions

func GetMaxHistoryLength added in v0.2.0

func GetMaxHistoryLength(doc *model.Workflow) (int, error)

func ParseSearchAttributes

func ParseSearchAttributes(ctx workflow.Context, metadata any) error

func SetActivityOptions added in v0.4.0

func SetActivityOptions(ctx workflow.Context, wf *model.Workflow, task *model.TaskBase, taskName string) (workflow.Context, error)

************** // Static Methods // ************** //

Types

type ActivityOptions added in v0.4.0

type ActivityOptions struct {
	ScheduleToCloseTimeout *model.Duration   `json:"scheduleToCloseTimeout"`
	ScheduleToStartTimeout *model.Duration   `json:"scheduleToStartTimeout"`
	StartToCloseTimeout    *model.Duration   `json:"startToCloseTimeout"`
	RetryPolicy            *RetryPolicy      `json:"retryPolicy"`
	DisableEagerExecution  *bool             `json:"disableEagerExecution"`
	Summary                string            `json:"summary"`
	Priority               *ActivityPriority `json:"priority"`
}

func (*ActivityOptions) ToTemporal added in v0.4.0

type ActivityPriority added in v0.4.0

type ActivityPriority struct {
	PriorityKey    *int     `json:"priorityKey"`
	FairnessKey    string   `json:"fairnessKey"`
	FairnessWeight *float32 `json:"fairnessWeight"`
}

func (*ActivityPriority) ToTemporal added in v0.4.0

func (a *ActivityPriority) ToTemporal(priority temporal.Priority) temporal.Priority

type RetryPolicy added in v0.4.0

type RetryPolicy struct {
	InitialInterval        *model.Duration `json:"initialInterval"`
	BackoffCoefficient     *float64        `json:"backoffCoefficient"`
	MaximumInterval        *model.Duration `json:"maximumInterval"`
	MaximumAttempts        *int32          `json:"maximumAttempts"`
	NonRetryableErrorTypes []string        `json:"nonRetryableErrorTypes"`
}

func (*RetryPolicy) ToTemporal added in v0.4.0

func (r *RetryPolicy) ToTemporal(retry *temporal.RetryPolicy) *temporal.RetryPolicy

type ScheduleInfo

type ScheduleInfo struct {
	ID           string
	WorkflowName string
	Input        []any
}

func GetScheduleInfo

func GetScheduleInfo(workflow *model.Workflow, envvars map[string]any) (*ScheduleInfo, error)

type SearchAttribute

type SearchAttribute struct {
	Type  string `json:"type"`
	Value any    `json:"value"` // If nil then the value is unset
}

Jump to

Keyboard shortcuts

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