Documentation ¶
Index ¶
- func ToYAML(ctx context.Context, workflow *Workflow) ([]byte, error)
- type Action
- type DesiredWorkerLabel
- type RandomScheduleOpt
- type RateLimit
- type RateLimitDuration
- type RateLimitOpts
- type StickyStrategy
- type WorkerLabelComparator
- type Workflow
- type WorkflowConcurrency
- type WorkflowConcurrencyLimitStrategy
- type WorkflowEvent
- type WorkflowJob
- type WorkflowOnCron
- type WorkflowStep
- type WorkflowTriggers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { // Required. The service that this belongs to Service string // Required. The verb to perform. Verb string // Optional. A way to unique identify the step. Subresource string }
func ParseActionID ¶
ParseActionID parses an action ID into its constituent parts.
func (Action) IntegrationVerbString ¶
type DesiredWorkerLabel ¶ added in v0.40.0
type DesiredWorkerLabel struct { Value any `yaml:"value,omitempty"` Required bool `yaml:"required,omitempty"` Weight int32 `yaml:"weight,omitempty"` Comparator *WorkerLabelComparator `yaml:"comparator,omitempty"` }
type RandomScheduleOpt ¶
type RandomScheduleOpt string
const ( Random15Min RandomScheduleOpt = "random_15_min" RandomHourly RandomScheduleOpt = "random_hourly" RandomDaily RandomScheduleOpt = "random_daily" )
type RateLimitDuration ¶ added in v0.19.0
type RateLimitDuration string
const ( Second RateLimitDuration = "second" Minute RateLimitDuration = "minute" Hour RateLimitDuration = "hour" Day RateLimitDuration = "day" Week RateLimitDuration = "week" Month RateLimitDuration = "month" Year RateLimitDuration = "year" )
type RateLimitOpts ¶ added in v0.19.0
type RateLimitOpts struct { Max int Duration RateLimitDuration }
type StickyStrategy ¶ added in v0.40.0
type StickyStrategy int32
const ( StickyStrategy_SOFT StickyStrategy = 0 StickyStrategy_HARD StickyStrategy = 1 )
func StickyStrategyPtr ¶ added in v0.40.0
func StickyStrategyPtr(v StickyStrategy) *StickyStrategy
type WorkerLabelComparator ¶ added in v0.40.0
type WorkerLabelComparator int32
const ( WorkerLabelComparator_EQUAL WorkerLabelComparator = 0 WorkerLabelComparator_NOT_EQUAL WorkerLabelComparator = 1 WorkerLabelComparator_GREATER_THAN WorkerLabelComparator = 2 WorkerLabelComparator_GREATER_THAN_OR_EQUAL WorkerLabelComparator = 3 WorkerLabelComparator_LESS_THAN WorkerLabelComparator = 4 WorkerLabelComparator_LESS_THAN_OR_EQUAL WorkerLabelComparator = 5 )
func ComparatorPtr ¶ added in v0.40.0
func ComparatorPtr(v WorkerLabelComparator) *WorkerLabelComparator
type Workflow ¶
type Workflow struct { Name string `yaml:"name,omitempty"` ScheduleTimeout string `yaml:"scheduleTimeout,omitempty"` Concurrency *WorkflowConcurrency `yaml:"concurrency,omitempty"` Version string `yaml:"version,omitempty"` Description string `yaml:"description,omitempty"` Triggers WorkflowTriggers `yaml:"triggers"` Jobs map[string]WorkflowJob `yaml:"jobs"` OnFailureJob *WorkflowJob `yaml:"onFailureJob,omitempty"` StickyStrategy *StickyStrategy `yaml:"sticky,omitempty"` }
func DefaultLoader ¶
func DefaultLoader() []*Workflow
func ReadAllValidFilesInDir ¶
func ReadHatchetYAMLFileBytes ¶
ReadHatchetYAMLFileBytes reads a given YAML file from a filepath and return the parsed workflow file
type WorkflowConcurrency ¶ added in v0.8.0
type WorkflowConcurrency struct { ActionID string `yaml:"action,omitempty"` MaxRuns int32 `yaml:"maxRuns,omitempty"` LimitStrategy WorkflowConcurrencyLimitStrategy `yaml:"limitStrategy,omitempty"` }
type WorkflowConcurrencyLimitStrategy ¶ added in v0.8.0
type WorkflowConcurrencyLimitStrategy string
const ( CancelInProgress WorkflowConcurrencyLimitStrategy = "CANCEL_IN_PROGRESS" GroupRoundRobin WorkflowConcurrencyLimitStrategy = "GROUP_ROUND_ROBIN" )
type WorkflowEvent ¶
type WorkflowEvent struct {
Name string `yaml:"name,omitempty"`
}
type WorkflowJob ¶
type WorkflowJob struct { Description string `yaml:"description,omitempty"` Steps []WorkflowStep `yaml:"steps"` }
type WorkflowOnCron ¶
type WorkflowOnCron struct {
Schedule string `yaml:"schedule,omitempty"`
}
type WorkflowStep ¶
type WorkflowStep struct { Name string `yaml:"name,omitempty"` ID string `yaml:"id,omitempty"` ActionID string `yaml:"action"` Timeout string `yaml:"timeout,omitempty"` With map[string]interface{} `yaml:"with,omitempty"` Parents []string `yaml:"parents,omitempty"` Retries int `yaml:"retries"` RateLimits []RateLimit `yaml:"rateLimits,omitempty"` DesiredLabels map[string]*DesiredWorkerLabel `yaml:"desiredLabels,omitempty"` }
Click to show internal directories.
Click to hide internal directories.