Documentation
¶
Overview ¶
package features provides functionality for interacting with hatchet features.
Index ¶
- func ValidateCronExpression(expression string) booldeprecated
- type APIKeyAuthdeprecated
- type BasicAuthdeprecated
- type CELClientdeprecated
- type CELEvaluationResultdeprecated
- type CreateCronTriggerdeprecated
- type CreateRatelimitOptsdeprecated
- type CreateScheduledRunTriggerdeprecated
- type CreateWebhookOptsdeprecated
- type CronsClientdeprecated
- type FiltersClientdeprecated
- type HMACAuthdeprecated
- type InvalidCronExpressionErrordeprecated
- type MetricsClientdeprecated
- type RateLimitsClientdeprecated
- type RunsClientdeprecated
- type SchedulesClientdeprecated
- type TenantClientdeprecated
- type UpdateWebhookOptsdeprecated
- type WebhookAuthdeprecated
- type WebhooksClientdeprecated
- type WorkersClientdeprecated
- type WorkflowsClientdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCronExpression
deprecated
Deprecated: ValidateCronExpression is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
ValidateCronExpression validates that a string is a valid cron expression.
Types ¶
type APIKeyAuth
deprecated
added in
v0.77.20
Deprecated: APIKeyAuth is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type BasicAuth
deprecated
added in
v0.77.20
Deprecated: BasicAuth is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type CELClient
deprecated
type CELClient interface {
Debug(ctx context.Context, expression string, input map[string]interface{}, additionalMetadata, filterPayload *map[string]interface{}) (*CELEvaluationResult, error)
}
Deprecated: CELClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
The CEL client is a client for debugging CEL expressions within Hatchet
func NewCELClient
deprecated
func NewCELClient( api *rest.ClientWithResponses, tenantId *string, ) CELClient
Deprecated: NewCELClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type CELEvaluationResult
deprecated
type CELEvaluationResult struct {
// contains filtered or unexported fields
}
Deprecated: CELEvaluationResult is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type CreateCronTrigger
deprecated
type CreateCronTrigger struct {
// Name is the unique identifier for the cron trigger.
Name string `json:"name"`
// Expression is the cron expression that defines the schedule.
Expression string `json:"expression"`
// Input is the optional input data for the workflow.
Input map[string]interface{} `json:"input,omitempty"`
// AdditionalMetadata is optional metadata to associate with the cron trigger.
AdditionalMetadata map[string]interface{} `json:"additionalMetadata,omitempty"`
Priority *int32 `json:"priority,omitempty"`
}
Deprecated: CreateCronTrigger is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
CreateCronTrigger contains the configuration for creating a cron trigger.
type CreateRatelimitOpts
deprecated
type CreateRatelimitOpts struct {
// key is the unique identifier for the rate limit
Key string
// limit is the maximum number of requests allowed within the duration
Limit int
// duration specifies the time period for the rate limit
Duration types.RateLimitDuration
}
Deprecated: CreateRatelimitOpts is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
createRatelimitOpts contains options for creating or updating a rate limit.
type CreateScheduledRunTrigger
deprecated
type CreateScheduledRunTrigger struct {
// TriggerAt specifies when the workflow should be triggered.
TriggerAt time.Time `json:"triggerAt"`
// Input is the optional input data for the workflow.
Input map[string]interface{} `json:"input,omitempty"`
// AdditionalMetadata is optional metadata to associate with the scheduled run.
AdditionalMetadata map[string]interface{} `json:"additionalMetadata,omitempty"`
Priority *int32 `json:"priority,omitempty"`
}
Deprecated: CreateScheduledRunTrigger is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
CreateScheduledRunTrigger contains the configuration for creating a scheduled run trigger.
type CreateWebhookOpts
deprecated
added in
v0.77.20
type CreateWebhookOpts struct {
Name string
SourceName rest.V1WebhookSourceName
EventKeyExpression string
Auth WebhookAuth
}
Deprecated: CreateWebhookOpts is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type CronsClient
deprecated
type CronsClient interface {
// Create creates a new cron workflow trigger.
Create(ctx context.Context, workflowName string, cron CreateCronTrigger) (*rest.CronWorkflows, error)
// Delete removes a cron workflow trigger.
Delete(ctx context.Context, cronId string) error
// List retrieves a collection of cron workflow triggers based on the provided parameters.
List(ctx context.Context, opts rest.CronWorkflowListParams) (*rest.CronWorkflowsList, error)
// Get retrieves a specific cron workflow trigger by its ID.
Get(ctx context.Context, cronId string) (*rest.CronWorkflows, error)
}
Deprecated: CronsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
CronsClient provides methods for interacting with cron workflow triggers in the Hatchet platform.
func NewCronsClient
deprecated
func NewCronsClient( api *rest.ClientWithResponses, tenantId *string, ) CronsClient
Deprecated: NewCronsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
NewCronsClient creates a new client for interacting with cron workflow triggers.
type FiltersClient
deprecated
type FiltersClient interface {
List(ctx context.Context, opts *rest.V1FilterListParams) (*rest.V1FilterList, error)
Get(ctx context.Context, filterID string) (*rest.V1Filter, error)
Create(ctx context.Context, opts rest.V1CreateFilterRequest) (*rest.V1Filter, error)
Delete(ctx context.Context, filterID string) (*rest.V1Filter, error)
Update(ctx context.Context, filterID string, opts rest.V1FilterUpdateJSONRequestBody) (*rest.V1Filter, error)
}
Deprecated: FiltersClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
func NewFiltersClient
deprecated
func NewFiltersClient( api *rest.ClientWithResponses, tenantID *string, ) FiltersClient
Deprecated: NewFiltersClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type HMACAuth
deprecated
added in
v0.77.20
type HMACAuth struct {
SigningSecret string
SignatureHeaderName string
Algorithm rest.V1WebhookHMACAlgorithm
Encoding rest.V1WebhookHMACEncoding
}
Deprecated: HMACAuth is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type InvalidCronExpressionError
deprecated
type InvalidCronExpressionError struct {
Expression string
}
Deprecated: InvalidCronExpressionError is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
InvalidCronExpressionError represents an error when an invalid cron expression is provided.
func (*InvalidCronExpressionError) Error ¶
func (e *InvalidCronExpressionError) Error() string
type MetricsClient
deprecated
type MetricsClient interface {
// GetWorkflowMetrics retrieves metrics for a specific workflow.
GetWorkflowMetrics(ctx context.Context, workflowId string, opts *rest.WorkflowGetMetricsParams) (*rest.WorkflowMetrics, error)
// GetQueueMetrics retrieves tenant-wide queue metrics.
GetQueueMetrics(ctx context.Context, opts *rest.TenantGetQueueMetricsParams) (*rest.TenantGetQueueMetricsResponse, error)
// GetTaskQueueMetrics retrieves tenant-wide step run queue metrics.
GetTaskQueueMetrics(ctx context.Context) (*rest.TenantGetStepRunQueueMetricsResponse, error)
}
Deprecated: MetricsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
MetricsClient provides methods for retrieving metrics data in the Hatchet platform.
func NewMetricsClient
deprecated
func NewMetricsClient( api *rest.ClientWithResponses, tenantId *string, ) MetricsClient
Deprecated: NewMetricsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
NewMetricsClient creates a new client for interacting with metrics.
type RateLimitsClient
deprecated
type RateLimitsClient interface {
// upsert creates or updates a rate limit with the provided options.
Upsert(opts CreateRatelimitOpts) error
// list retrieves rate limits based on the provided parameters (optional).
List(ctx context.Context, opts *rest.RateLimitListParams) (*rest.RateLimitListResponse, error)
}
Deprecated: RateLimitsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
rateLimitsClient provides an interface for managing rate limits.
func NewRateLimitsClient
deprecated
func NewRateLimitsClient( api *rest.ClientWithResponses, tenantId *string, admin *v0Client.AdminClient, ) RateLimitsClient
Deprecated: NewRateLimitsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
newRateLimitsClient creates a new rateLimitsClient with the provided api client, tenant id, and admin client.
type RunsClient
deprecated
type RunsClient interface {
// Get retrieves a workflow run by its ID.
Get(ctx context.Context, runId string) (*rest.V1WorkflowRunGetResponse, error)
// Get the status of a workflow run by its ID.
GetStatus(ctx context.Context, runId string) (*rest.V1WorkflowRunGetStatusResponse, error)
// GetDetails retrieves detailed information about a workflow run by its ID.
// Deprecated: Use Get instead.
GetDetails(ctx context.Context, runId string) (*rest.V1WorkflowRunGetResponse, error)
// List retrieves a collection of workflow runs based on the provided parameters.
List(ctx context.Context, opts rest.V1WorkflowRunListParams) (*rest.V1WorkflowRunListResponse, error)
// Replay requests a task to be replayed within a workflow run.
Replay(ctx context.Context, opts rest.V1ReplayTaskRequest) (*rest.V1TaskReplayResponse, error)
// Cancel requests cancellation of a specific task within a workflow run.
Cancel(ctx context.Context, opts rest.V1CancelTaskRequest) (*rest.V1TaskCancelResponse, error)
// SubscribeToStream subscribes to streaming events for a specific workflow run.
SubscribeToStream(ctx context.Context, workflowRunId string) (<-chan string, error)
}
Deprecated: RunsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
RunsClient provides methods for interacting with workflow runs in the Hatchet platform.
func NewRunsClient
deprecated
func NewRunsClient( api *rest.ClientWithResponses, tenantId *string, v0Client client.Client, ) RunsClient
Deprecated: NewRunsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
NewRunsClient creates a new client for interacting with workflow runs.
type SchedulesClient
deprecated
type SchedulesClient interface {
// Create creates a new scheduled workflow run.
Create(ctx context.Context, workflowName string, trigger CreateScheduledRunTrigger) (*rest.ScheduledWorkflows, error)
// Delete removes a scheduled workflow run.
Delete(ctx context.Context, scheduledRunId string) error
// List retrieves a collection of scheduled workflow runs based on the provided parameters.
List(ctx context.Context, opts rest.WorkflowScheduledListParams) (*rest.ScheduledWorkflowsList, error)
// Get retrieves a specific scheduled workflow run by its ID.
Get(ctx context.Context, scheduledRunId string) (*rest.ScheduledWorkflows, error)
}
Deprecated: SchedulesClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
SchedulesClient provides methods for interacting with workflow schedules in the Hatchet platform.
func NewSchedulesClient
deprecated
func NewSchedulesClient( api *rest.ClientWithResponses, tenantId *string, namespace *string, ) SchedulesClient
Deprecated: NewSchedulesClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
NewSchedulesClient creates a new client for interacting with workflow schedules.
type TenantClient
deprecated
type TenantClient interface {
// Get the details of the current tenant
Get(ctx context.Context) (*rest.Tenant, error)
}
Deprecated: TenantClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
TenantClient provides methods for interacting with your Tenant
func NewTenantCliet
deprecated
func NewTenantCliet( api *rest.ClientWithResponses, tenantId *string, ) TenantClient
Deprecated: NewTenantCliet is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type UpdateWebhookOpts
deprecated
added in
v0.77.20
type UpdateWebhookOpts struct {
EventKeyExpression string
}
Deprecated: UpdateWebhookOpts is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type WebhookAuth
deprecated
added in
v0.77.20
type WebhookAuth interface {
// contains filtered or unexported methods
}
Deprecated: WebhookAuth is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
type WebhooksClient
deprecated
added in
v0.77.20
type WebhooksClient interface {
// List retrieves a collection of webhooks based on the provided parameters.
List(ctx context.Context, opts rest.V1WebhookListParams) (*rest.V1WebhookList, error)
// Get retrieves a specific webhook by its name.
Get(ctx context.Context, webhookName string) (*rest.V1Webhook, error)
// Create creates a new webhook configuration.
Create(ctx context.Context, opts CreateWebhookOpts) (*rest.V1Webhook, error)
// Update updates an existing webhook configuration.
Update(ctx context.Context, webhookName string, opts UpdateWebhookOpts) (*rest.V1Webhook, error)
// Delete removes a webhook configuration.
Delete(ctx context.Context, webhookName string) error
}
Deprecated: WebhooksClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
WebhooksClient provides methods for managing webhook configurations.
func NewWebhooksClient
deprecated
added in
v0.77.20
func NewWebhooksClient( api *rest.ClientWithResponses, tenantId *string, ) WebhooksClient
Deprecated: NewWebhooksClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
NewWebhooksClient creates a new client for managing webhook configurations.
type WorkersClient
deprecated
type WorkersClient interface {
// Get retrieves a worker by its ID.
Get(ctx context.Context, workerId string) (*rest.Worker, error)
// List retrieves all workers for the tenant.
List(ctx context.Context) (*rest.WorkerList, error)
// IsPaused checks if a worker is paused.
IsPaused(ctx context.Context, workerId string) (bool, error)
// Pause pauses a worker.
Pause(ctx context.Context, workerId string) (*rest.Worker, error)
// Unpause unpauses a worker.
Unpause(ctx context.Context, workerId string) (*rest.Worker, error)
}
Deprecated: WorkersClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
WorkersClient provides methods for interacting with workers in the Hatchet platform.
func NewWorkersClient
deprecated
func NewWorkersClient( api *rest.ClientWithResponses, tenantId *string, ) WorkersClient
Deprecated: NewWorkersClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
NewWorkersClient creates a new client for interacting with workers.
type WorkflowsClient
deprecated
type WorkflowsClient interface {
// Get retrieves a workflow by its name.
Get(ctx context.Context, workflowName string) (*rest.Workflow, error)
// GetId retrieves a workflow by its name.
GetId(ctx context.Context, workflowName string) (uuid.UUID, error)
// List retrieves all workflows for the tenant with optional filtering parameters.
List(ctx context.Context, opts *rest.WorkflowListParams) (*rest.WorkflowList, error)
// Delete removes a workflow by its name.
Delete(ctx context.Context, workflowName string) (*rest.WorkflowDeleteResponse, error)
}
Deprecated: WorkflowsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
WorkflowsClient provides methods for interacting with workflows in the Hatchet platform.
func NewWorkflowsClient
deprecated
func NewWorkflowsClient( api *rest.ClientWithResponses, tenantId *string, ) WorkflowsClient
Deprecated: NewWorkflowsClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go
NewWorkflowsClient creates a new client for interacting with workflows.