Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WorkflowFactory ¶ added in v0.55.26
func WorkflowFactory[I any, O any](opts workflow.CreateOpts[I], client *HatchetClient) workflow.WorkflowDeclaration[I, O]
WorkflowFactory creates a new workflow declaration with the specified input and output types before a client is initialized. This function is used to create strongly typed workflow declarations with the given client. NOTE: This is placed on the client due to circular dependency concerns.
Types ¶
type HatchetClient ¶
type HatchetClient interface {
// V0 returns the underlying V0 client for backward compatibility.
V0() v0Client.Client
// Workflow creates a new workflow declaration with the provided options.
Workflow(opts workflow.CreateOpts[any]) workflow.WorkflowDeclaration[any, any]
// Worker creates and configures a new worker with the provided options and optional configuration functions.
// @example
// “`go
// worker, err := hatchet.Worker(worker.CreateOpts{
// Name: "my-worker",
// },
// v1.WithWorkflows(simple)
// )
// “`
Worker(opts worker.CreateOpts, optFns ...func(*worker.WorkerImpl)) (worker.Worker, error)
Metrics() *features.MetricsClient
RateLimits() *features.RateLimitsClient
Runs() *features.RunsClient
Workers() *features.WorkersClient
Workflows() *features.WorkflowsClient
Crons() *features.CronsClient
Schedules() *features.SchedulesClient
}
HatchetClient is the main interface for interacting with the Hatchet task orchestrator. It provides access to workflow creation, worker registration, and legacy V0 client functionality.
func NewHatchetClient ¶
func NewHatchetClient(config ...Config) (HatchetClient, error)
NewHatchetClient creates a new V1 Hatchet client with the provided configuration. If no configuration is provided, default settings will be used.
type TLSConfig ¶
type TLSConfig struct {
Base *shared.TLSConfigFile
TLSServerName string
}
Directories
¶
| Path | Synopsis |
|---|---|
|
package features provides functionality for interacting with hatchet features.
|
package features provides functionality for interacting with hatchet features. |
|
package worker provides functionality for creating and managing hatchet workers.
|
package worker provides functionality for creating and managing hatchet workers. |
|
Package workflow provides functionality for defining, managing, and executing workflows in Hatchet.
|
Package workflow provides functionality for defining, managing, and executing workflows in Hatchet. |
Click to show internal directories.
Click to hide internal directories.