Documentation
¶
Index ¶
- type ClientOptions
- type CreateScheduleOptions
- type PriceSyncWorkflowInput
- type ProcessFileChunkActivityInput
- type ProcessFileChunkActivityResult
- type ProcessTaskActivityInput
- type ProcessTaskActivityResult
- type RetryPolicy
- type ScheduleHandle
- type StartWorkflowOptions
- type TaskProcessingWorkflowInput
- type TaskProcessingWorkflowResult
- type TemporalWorkflowResult
- type UpdateTaskProgressActivityInput
- type WorkerOptions
- type WorkflowRun
- type WorkflowTimeout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOptions ¶ added in v1.0.27
type ClientOptions struct {
// Address is the host:port of the Temporal server
Address string
// Namespace is the Temporal namespace to use
Namespace string
// APIKey is the authentication key for Temporal Cloud
APIKey string
// TLS enables TLS for the connection
TLS bool
// RetryPolicy defines the default retry policy for workflows
RetryPolicy *common.RetryPolicy
// DataConverter is an optional data converter for serialization
DataConverter converter.DataConverter
}
ClientOptions represents configuration options for creating a Temporal client
func DefaultClientOptions ¶ added in v1.0.27
func DefaultClientOptions() *ClientOptions
DefaultClientOptions returns the default client options
func (*ClientOptions) ToSDKOptions ¶ added in v1.0.27
func (o *ClientOptions) ToSDKOptions() client.Options
ToSDKOptions converts ClientOptions to Temporal SDK client.Options
type CreateScheduleOptions ¶ added in v1.0.32
type CreateScheduleOptions struct {
ID string
Spec client.ScheduleSpec
Action *client.ScheduleWorkflowAction
Paused bool
}
CreateScheduleOptions represents options for creating a schedule
func (*CreateScheduleOptions) ToSDKOptions ¶ added in v1.0.32
func (o *CreateScheduleOptions) ToSDKOptions() client.ScheduleOptions
ToSDKOptions converts CreateScheduleOptions to Temporal SDK client.ScheduleOptions
type PriceSyncWorkflowInput ¶ added in v1.0.23
type PriceSyncWorkflowInput struct {
PlanID string `json:"plan_id"`
TenantID string `json:"tenant_id"`
EnvironmentID string `json:"environment_id"`
UserID string `json:"user_id"`
}
PriceSyncWorkflowInput represents input for the price sync workflow
func (*PriceSyncWorkflowInput) Validate ¶ added in v1.0.25
func (p *PriceSyncWorkflowInput) Validate() error
type ProcessFileChunkActivityInput ¶ added in v1.0.27
type ProcessFileChunkActivityInput struct {
TaskID string `json:"task_id"`
ChunkData [][]string `json:"chunk_data"`
ChunkIndex int `json:"chunk_index"`
TotalChunks int `json:"total_chunks"`
Headers []string `json:"headers"`
EntityType string `json:"entity_type"`
TenantID string `json:"tenant_id"`
EnvironmentID string `json:"environment_id"`
}
ProcessFileChunkActivityInput represents the input for processing a file chunk
func (*ProcessFileChunkActivityInput) Validate ¶ added in v1.0.27
func (i *ProcessFileChunkActivityInput) Validate() error
Validate validates the process file chunk activity input
type ProcessFileChunkActivityResult ¶ added in v1.0.27
type ProcessFileChunkActivityResult struct {
ChunkIndex int `json:"chunk_index"`
ProcessedRecords int `json:"processed_records"`
SuccessfulRecords int `json:"successful_records"`
FailedRecords int `json:"failed_records"`
ErrorSummary *string `json:"error_summary,omitempty"`
}
ProcessFileChunkActivityResult represents the result of processing a file chunk
type ProcessTaskActivityInput ¶ added in v1.0.27
type ProcessTaskActivityInput struct {
TaskID string `json:"task_id"`
TenantID string `json:"tenant_id"`
EnvironmentID string `json:"environment_id"`
}
ProcessTaskActivityInput represents the input for process task activity
func (*ProcessTaskActivityInput) Validate ¶ added in v1.0.27
func (i *ProcessTaskActivityInput) Validate() error
Validate validates the process task activity input
type ProcessTaskActivityResult ¶ added in v1.0.27
type ProcessTaskActivityResult struct {
TaskID string `json:"task_id"`
ProcessedRecords int `json:"processed_records"`
SuccessfulRecords int `json:"successful_records"`
FailedRecords int `json:"failed_records"`
ErrorSummary *string `json:"error_summary,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
ProcessTaskActivityResult represents the result of process task activity
type RetryPolicy ¶ added in v1.0.27
type RetryPolicy struct {
// InitialInterval is the initial interval between retries
InitialInterval time.Duration
// BackoffCoefficient is the coefficient to multiply the interval by for each retry
BackoffCoefficient float64
// MaximumInterval is the maximum interval between retries
MaximumInterval time.Duration
// MaximumAttempts is the maximum number of attempts
MaximumAttempts int32
// NonRetryableErrorTypes specifies error types that shouldn't be retried
NonRetryableErrorTypes []string
}
RetryPolicy defines how to retry workflow execution
func (*RetryPolicy) ToSDKRetryPolicy ¶ added in v1.0.27
func (p *RetryPolicy) ToSDKRetryPolicy() *temporal.RetryPolicy
ToSDKRetryPolicy converts RetryPolicy to Temporal SDK temporal.RetryPolicy
type ScheduleHandle ¶ added in v1.0.32
type ScheduleHandle interface {
// Pause pauses the schedule
Pause(ctx context.Context, options client.SchedulePauseOptions) error
// Unpause unpauses the schedule
Unpause(ctx context.Context, options client.ScheduleUnpauseOptions) error
// Delete deletes the schedule
Delete(ctx context.Context) error
// Describe gets schedule information
Describe(ctx context.Context) (*client.ScheduleDescription, error)
// Update updates the schedule
Update(ctx context.Context, options client.ScheduleUpdateOptions) error
}
ScheduleHandle represents a handle to a Temporal schedule
func NewScheduleHandle ¶ added in v1.0.32
func NewScheduleHandle(handle client.ScheduleHandle) ScheduleHandle
NewScheduleHandle creates a new schedule handle wrapper
type StartWorkflowOptions ¶ added in v1.0.27
type StartWorkflowOptions struct {
// ID is the business identifier of the workflow execution
ID string
// TaskQueue is the task queue name to use for workflow tasks
TaskQueue string
// WorkflowExecutionTimeout is the timeout for the entire workflow execution
WorkflowExecutionTimeout time.Duration
// WorkflowRunTimeout is the timeout for a single workflow run
WorkflowRunTimeout time.Duration
// WorkflowTaskTimeout is the timeout for processing workflow task from the time the worker
// pulled this task
WorkflowTaskTimeout time.Duration
// RetryPolicy specifies how to retry workflow execution
RetryPolicy *RetryPolicy
}
StartWorkflowOptions contains options for starting a workflow
func (StartWorkflowOptions) ToSDKOptions ¶ added in v1.0.27
func (o StartWorkflowOptions) ToSDKOptions() client.StartWorkflowOptions
ToSDKOptions converts StartWorkflowOptions to Temporal SDK client.StartWorkflowOptions
type TaskProcessingWorkflowInput ¶ added in v1.0.27
type TaskProcessingWorkflowInput struct {
TaskID string `json:"task_id"`
TenantID string `json:"tenant_id"`
EnvironmentID string `json:"environment_id"`
UserID string `json:"user_id"`
}
TaskProcessingWorkflowInput represents the input for task processing workflow
func (*TaskProcessingWorkflowInput) Validate ¶ added in v1.0.27
func (i *TaskProcessingWorkflowInput) Validate() error
Validate validates the task processing workflow input
type TaskProcessingWorkflowResult ¶ added in v1.0.27
type TaskProcessingWorkflowResult struct {
TaskID string `json:"task_id"`
Status string `json:"status"`
ProcessedRecords int `json:"processed_records"`
SuccessfulRecords int `json:"successful_records"`
FailedRecords int `json:"failed_records"`
ErrorSummary *string `json:"error_summary,omitempty"`
CompletedAt time.Time `json:"completed_at"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
TaskProcessingWorkflowResult represents the result of task processing workflow
type TemporalWorkflowResult ¶ added in v1.0.25
type UpdateTaskProgressActivityInput ¶ added in v1.0.27
type UpdateTaskProgressActivityInput struct {
TaskID string `json:"task_id"`
ProcessedRecords int `json:"processed_records"`
SuccessfulRecords int `json:"successful_records"`
FailedRecords int `json:"failed_records"`
ErrorSummary *string `json:"error_summary,omitempty"`
}
UpdateTaskProgressActivityInput represents the input for update task progress activity
func (*UpdateTaskProgressActivityInput) Validate ¶ added in v1.0.27
func (i *UpdateTaskProgressActivityInput) Validate() error
Validate validates the update task progress activity input
type WorkerOptions ¶ added in v1.0.27
type WorkerOptions struct {
// TaskQueue is the name of the task queue to listen on
TaskQueue string
// MaxConcurrentActivityExecutionSize is the maximum number of activities that can be executed concurrently
MaxConcurrentActivityExecutionSize int
// MaxConcurrentWorkflowTaskExecutionSize is the maximum number of workflow tasks that can be executed concurrently
MaxConcurrentWorkflowTaskExecutionSize int
// WorkerStopTimeout is the time to wait for worker to stop gracefully
WorkerStopTimeout time.Duration
// EnableLoggingInReplay enables logging in replay mode
EnableLoggingInReplay bool
}
WorkerOptions represents configuration options for creating a Temporal worker
func DefaultWorkerOptions ¶ added in v1.0.27
func DefaultWorkerOptions() *WorkerOptions
DefaultWorkerOptions returns the default worker options
func (*WorkerOptions) ToSDKOptions ¶ added in v1.0.27
func (o *WorkerOptions) ToSDKOptions() worker.Options
ToSDKOptions converts WorkerOptions to Temporal SDK worker.Options
type WorkflowRun ¶ added in v1.0.27
type WorkflowRun interface {
// GetID returns the workflow ID
GetID() string
// GetRunID returns the workflow run ID
GetRunID() string
// Get blocks until workflow completes and returns its result
Get(ctx context.Context, valuePtr interface{}) error
}
WorkflowRun represents a workflow execution
func NewWorkflowRun ¶ added in v1.0.27
func NewWorkflowRun(run client.WorkflowRun) WorkflowRun
NewWorkflowRun creates a new WorkflowRun from a Temporal SDK WorkflowRun
type WorkflowTimeout ¶ added in v1.0.27
type WorkflowTimeout struct {
// ExecutionTimeout is the timeout for the entire workflow execution
ExecutionTimeout time.Duration
// RunTimeout is the timeout for a single workflow run
RunTimeout time.Duration
// TaskTimeout is the timeout for processing workflow task
TaskTimeout time.Duration
}
WorkflowTimeout defines timeout settings for workflow execution