Documentation
¶
Index ¶
- Constants
- func Cancellation(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[CancellationInput, CancellationResult]
- func Child(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ChildInput, ValueOutput]
- func ConcurrencyRoundRobin(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ConcurrencyInput, TransformedOutput]
- func DagWithConditionsWorkflow(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DagWithConditionsInput, DagWithConditionsResult]
- func DagWorkflow(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DagInput, DagResult]
- func DurableEvent(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DurableEventInput, DurableEventOutput]
- func DurableSleep(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DurableSleepInput, DurableSleepOutput]
- func Lower(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[EventInput, LowerTaskOutput]
- func MultipleConcurrencyKeys(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ConcurrencyInput, TransformedOutput]
- func NonRetryableError(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[NonRetryableInput, NonRetryableResult]
- func OnCron(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[OnCronInput, OnCronOutput]
- func OnFailure(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[any, OnFailureSuccessResult]
- func Parent(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ParentInput, SumOutput]
- func ParentTask(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[SimpleInput, SimpleResult]
- func Priority(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[PriorityInput, Result]
- func RateLimit(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RateLimitInput, RateLimitOutput]
- func Retries(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RetriesInput, RetriesResult]
- func RetriesWithCount(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RetriesWithCountInput, RetriesWithCountResult]
- func Simple(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[SimpleInput, SimpleResult]
- func StaticRateLimit(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RateLimitInput, RateLimitOutput]
- func Sticky(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[StickyInput, StickyResult]
- func StickyDag(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[StickyInput, StickyDagResult]
- func TaskConditionWorkflow(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[struct{}, TaskConditionWorkflowResult]
- func Timeout(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[TimeoutInput, TimeoutResult]
- func Upper(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[EventInput, UpperTaskOutput]
- func WithBackoff(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[BackoffInput, BackoffResult]
- type AlwaysFailsOutput
- type BackoffInput
- type BackoffResult
- type CancellationInput
- type CancellationResult
- type ChildInput
- type ConcurrencyInput
- type DagInput
- type DagResult
- type DagWithConditionsInput
- type DagWithConditionsResult
- type DurableEventInput
- type DurableEventOutput
- type DurableSleepInput
- type DurableSleepOutput
- type EventData
- type EventInput
- type JobResult
- type LowerTaskOutput
- type NonRetryableInput
- type NonRetryableResult
- type OnCronInput
- type OnCronOutput
- type OnFailureOutput
- type OnFailureSuccessResult
- type ParentInput
- type PriorityInput
- type PriorityOutput
- type RandomSum
- type RateLimitInput
- type RateLimitOutput
- type Result
- type RetriesInput
- type RetriesResult
- type RetriesWithCountInput
- type RetriesWithCountResult
- type SimpleInput
- type SimpleOutput
- type SimpleResult
- type StepOutput
- type StickyDagResult
- type StickyInput
- type StickyResult
- type SumOutput
- type TaskConditionWorkflowResult
- type TimeoutInput
- type TimeoutResult
- type TransformedOutput
- type UpperTaskOutput
- type ValueOutput
Constants ¶
View Source
const SimpleEvent = "simple-event:create"
❓ Run workflow on event
Variables ¶
This section is empty.
Functions ¶
func Cancellation ¶ added in v0.57.0
func Cancellation(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[CancellationInput, CancellationResult]
func Child ¶
func Child(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ChildInput, ValueOutput]
func ConcurrencyRoundRobin ¶
func ConcurrencyRoundRobin(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ConcurrencyInput, TransformedOutput]
func DagWithConditionsWorkflow ¶ added in v0.57.0
func DagWithConditionsWorkflow(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DagWithConditionsInput, DagWithConditionsResult]
func DagWorkflow ¶
func DagWorkflow(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DagInput, DagResult]
func DurableEvent ¶ added in v0.57.0
func DurableEvent(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DurableEventInput, DurableEventOutput]
func DurableSleep ¶
func DurableSleep(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[DurableSleepInput, DurableSleepOutput]
func Lower ¶
func Lower(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[EventInput, LowerTaskOutput]
func MultipleConcurrencyKeys ¶ added in v0.60.0
func MultipleConcurrencyKeys(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ConcurrencyInput, TransformedOutput]
func NonRetryableError ¶ added in v0.58.0
func NonRetryableError(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[NonRetryableInput, NonRetryableResult]
NonRetryableError returns a workflow which throws a non-retryable error
func OnCron ¶ added in v0.57.0
func OnCron(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[OnCronInput, OnCronOutput]
❓ Workflow Definition Cron Trigger
func OnFailure ¶
func OnFailure(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[any, OnFailureSuccessResult]
func Parent ¶
func Parent(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[ParentInput, SumOutput]
func ParentTask ¶ added in v0.58.1
func ParentTask(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[SimpleInput, SimpleResult]
func Priority ¶ added in v0.59.0
func Priority(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[PriorityInput, Result]
func RateLimit ¶ added in v0.58.1
func RateLimit(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RateLimitInput, RateLimitOutput]
❓ Dynamic Rate Limit
func Retries ¶ added in v0.57.0
func Retries(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RetriesInput, RetriesResult]
Simple retries example that always fails
func RetriesWithCount ¶ added in v0.57.0
func RetriesWithCount(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RetriesWithCountInput, RetriesWithCountResult]
Retries example that succeeds after a certain number of retries
func Simple ¶
func Simple(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[SimpleInput, SimpleResult]
func StaticRateLimit ¶ added in v0.58.1
func StaticRateLimit(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[RateLimitInput, RateLimitOutput]
❓ Static Rate Limit
func Sticky ¶ added in v0.57.0
func Sticky(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[StickyInput, StickyResult]
func StickyDag ¶ added in v0.57.0
func StickyDag(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[StickyInput, StickyDagResult]
func TaskConditionWorkflow ¶ added in v0.58.1
func TaskConditionWorkflow(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[struct{}, TaskConditionWorkflowResult]
func Timeout ¶ added in v0.57.0
func Timeout(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[TimeoutInput, TimeoutResult]
func Upper ¶
func Upper(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[EventInput, UpperTaskOutput]
func WithBackoff ¶ added in v0.57.0
func WithBackoff(hatchet v1.HatchetClient) workflow.WorkflowDeclaration[BackoffInput, BackoffResult]
Retries example with simple backoff (no configuration in this API version)
Types ¶
type AlwaysFailsOutput ¶
type AlwaysFailsOutput struct {
TransformedMessage string
}
type BackoffInput ¶ added in v0.57.0
type BackoffInput struct{}
type BackoffResult ¶ added in v0.57.0
type BackoffResult struct{}
type CancellationInput ¶ added in v0.57.0
type CancellationInput struct{}
type CancellationResult ¶ added in v0.57.0
type CancellationResult struct {
Completed bool
}
type ChildInput ¶
type ChildInput struct {
N int `json:"n"`
}
type ConcurrencyInput ¶
type DagResult ¶
type DagResult struct {
Step1 SimpleOutput
Step2 SimpleOutput
}
type DagWithConditionsInput ¶ added in v0.57.0
type DagWithConditionsInput struct {
Message string
}
type DagWithConditionsResult ¶ added in v0.57.0
type DagWithConditionsResult struct {
Step1 SimpleOutput
Step2 SimpleOutput
}
type DurableEventInput ¶ added in v0.57.0
type DurableEventInput struct {
Message string
}
type DurableEventOutput ¶ added in v0.57.0
type DurableEventOutput struct {
Data EventData
}
type DurableSleepInput ¶
type DurableSleepInput struct {
Message string
}
type DurableSleepOutput ¶
type DurableSleepOutput struct {
TransformedMessage string
}
type EventInput ¶
type EventInput struct {
Message string
}
type JobResult ¶ added in v0.57.0
type JobResult struct {
TransformedMessage string `json:"TransformedMessage"`
}
type LowerTaskOutput ¶
type LowerTaskOutput struct {
TransformedMessage string
}
type NonRetryableInput ¶ added in v0.58.0
type NonRetryableInput struct{}
type NonRetryableResult ¶ added in v0.58.0
type NonRetryableResult struct{}
type OnCronInput ¶ added in v0.57.0
type OnCronInput struct {
Message string `json:"Message"`
}
type OnCronOutput ¶ added in v0.57.0
type OnCronOutput struct {
Job JobResult `json:"job"`
}
type OnFailureOutput ¶
type OnFailureOutput struct {
FailureRan bool
}
type OnFailureSuccessResult ¶
type OnFailureSuccessResult struct {
AlwaysFails AlwaysFailsOutput
}
type ParentInput ¶
type ParentInput struct {
N int `json:"n"`
}
type PriorityInput ¶ added in v0.59.0
type PriorityInput struct {
UserId string `json:"userId"`
}
type PriorityOutput ¶ added in v0.59.0
type PriorityOutput struct {
TransformedMessage string `json:"TransformedMessage"`
}
type RandomSum ¶ added in v0.58.1
type RandomSum struct {
Sum int `json:"sum"`
}
RandomSum represents the output of the sum task
type RateLimitInput ¶ added in v0.58.1
type RateLimitInput struct {
UserId string `json:"userId"`
}
type RateLimitOutput ¶ added in v0.58.1
type RateLimitOutput struct {
TransformedMessage string `json:"TransformedMessage"`
}
type Result ¶ added in v0.59.0
type Result struct {
Step PriorityOutput
}
type RetriesInput ¶ added in v0.57.0
type RetriesInput struct{}
type RetriesResult ¶ added in v0.57.0
type RetriesResult struct{}
type RetriesWithCountInput ¶ added in v0.57.0
type RetriesWithCountInput struct{}
type RetriesWithCountResult ¶ added in v0.57.0
type RetriesWithCountResult struct {
Message string `json:"message"`
}
type SimpleInput ¶
type SimpleInput struct {
Message string
}
type SimpleOutput ¶
type SimpleOutput struct {
Step int
}
type SimpleResult ¶
type SimpleResult struct {
TransformedMessage string
}
type StepOutput ¶ added in v0.58.1
type StepOutput struct {
RandomNumber int `json:"randomNumber"`
}
StepOutput represents the output of most tasks in this workflow
type StickyDagResult ¶ added in v0.57.0
type StickyDagResult struct {
StickyTask1 StickyResult `json:"sticky-task-1"`
StickyTask2 StickyResult `json:"sticky-task-2"`
}
type StickyInput ¶ added in v0.57.0
type StickyInput struct{}
type StickyResult ¶ added in v0.57.0
type StickyResult struct {
Result string `json:"result"`
}
type TaskConditionWorkflowResult ¶ added in v0.58.1
type TaskConditionWorkflowResult struct {
Start StepOutput `json:"start"`
WaitForSleep StepOutput `json:"waitForSleep"`
WaitForEvent StepOutput `json:"waitForEvent"`
SkipOnEvent StepOutput `json:"skipOnEvent"`
LeftBranch StepOutput `json:"leftBranch"`
RightBranch StepOutput `json:"rightBranch"`
Sum RandomSum `json:"sum"`
}
TaskConditionWorkflowResult represents the aggregate output of all tasks
type TimeoutInput ¶ added in v0.57.0
type TimeoutInput struct{}
type TimeoutResult ¶ added in v0.57.0
type TimeoutResult struct {
Completed bool
}
type TransformedOutput ¶
type TransformedOutput struct {
TransformedMessage string
}
type UpperTaskOutput ¶
type UpperTaskOutput struct {
TransformedMessage string
}
type ValueOutput ¶
type ValueOutput struct {
Value int `json:"value"`
}
Click to show internal directories.
Click to hide internal directories.