Documentation
¶
Index ¶
- func NewClient(config *Config) (client.Client, error)
- func NewClientWithMetrics(config *Config, metricsEnabled bool) (client.Client, error)
- type Config
- type DashboardStats
- type ScheduleManager
- func (sm *ScheduleManager) Close()
- func (sm *ScheduleManager) CreateSchedule(ctx context.Context, scheduleID string, spec client.ScheduleSpec, ...) (client.ScheduleHandle, error)
- func (sm *ScheduleManager) CreateScheduleWithOptions(ctx context.Context, options client.ScheduleOptions) (client.ScheduleHandle, error)
- func (sm *ScheduleManager) CreateWorkflowSchedule(ctx context.Context, scheduleName string, options WorkflowScheduleOptions) (client.ScheduleHandle, error)
- func (sm *ScheduleManager) DeleteSchedule(ctx context.Context, scheduleID string) error
- func (sm *ScheduleManager) DeleteSchedules(ctx context.Context) error
- func (sm *ScheduleManager) GetClient() client.Client
- func (sm *ScheduleManager) GetSchedule(ctx context.Context, scheduleID string) (client.ScheduleHandle, error)
- func (sm *ScheduleManager) GetScheduleHandlers() map[string]client.ScheduleHandle
- func (sm *ScheduleManager) ListSchedules(ctx context.Context, limit int) ([]*client.ScheduleListEntry, error)
- func (sm *ScheduleManager) UpdateSchedule(ctx context.Context, scheduleID string, spec client.ScheduleSpec, ...) error
- type TimeRange
- type WorkerManager
- func (wm *WorkerManager) Close()
- func (wm *WorkerManager) GetClient() client.Client
- func (wm *WorkerManager) GetWorkers() []worker.Worker
- func (wm *WorkerManager) Register(taskQueue string, options worker.Options) worker.Worker
- func (wm *WorkerManager) Start(ctx context.Context, w worker.Worker) error
- func (wm *WorkerManager) StartAll(ctx context.Context) error
- type WorkflowDetails
- type WorkflowFilter
- type WorkflowManager
- func (wm *WorkflowManager) CancelWorkflow(ctx context.Context, workflowID, runID string) error
- func (wm *WorkflowManager) Close()
- func (wm *WorkflowManager) CountWorkflows(ctx context.Context, query string) (int64, error)
- func (wm *WorkflowManager) DescribeWorkflow(ctx context.Context, workflowID, runID string) (*WorkflowDetails, error)
- func (wm *WorkflowManager) GetClient() client.Client
- func (wm *WorkflowManager) GetDashboardStats(ctx context.Context) (*DashboardStats, error)
- func (wm *WorkflowManager) GetRecentWorkflows(ctx context.Context, limit int) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) GetWorkflowHistory(ctx context.Context, workflowID, runID string) (*workflowservice.GetWorkflowExecutionHistoryResponse, error)
- func (wm *WorkflowManager) GetWorkflowResult(ctx context.Context, workflowID, runID string, valuePtr interface{}) error
- func (wm *WorkflowManager) GetWorkflowStatus(ctx context.Context, workflowID, runID string) (enums.WorkflowExecutionStatus, error)
- func (wm *WorkflowManager) ListCompletedWorkflows(ctx context.Context, pageSize int) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) ListFailedWorkflows(ctx context.Context, pageSize int) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) ListRunningWorkflows(ctx context.Context, pageSize int) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) ListWorkflows(ctx context.Context, pageSize int, query string) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) ListWorkflowsByStatus(ctx context.Context, status enums.WorkflowExecutionStatus, pageSize int) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) QueryWorkflow(ctx context.Context, workflowID, runID, queryType string, args ...interface{}) (interface{}, error)
- func (wm *WorkflowManager) SearchWorkflowsByID(ctx context.Context, workflowIDPrefix string, pageSize int) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) SearchWorkflowsByType(ctx context.Context, workflowType string, pageSize int) ([]*WorkflowDetails, error)
- func (wm *WorkflowManager) SignalWorkflow(ctx context.Context, workflowID, runID, signalName string, arg interface{}) error
- func (wm *WorkflowManager) TerminateWorkflow(ctx context.Context, workflowID, runID, reason string) error
- type WorkflowScheduleOptions
- type ZerologAdapter
- func (z *ZerologAdapter) Debug(msg string, keyvals ...interface{})
- func (z *ZerologAdapter) Error(msg string, keyvals ...interface{})
- func (z *ZerologAdapter) Info(msg string, keyvals ...interface{})
- func (z *ZerologAdapter) Warn(msg string, keyvals ...interface{})
- func (z *ZerologAdapter) With(keyvals ...interface{}) temporallog.Logger
- func (z *ZerologAdapter) WithCallerSkip(skip int) temporallog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
HostPort string `yaml:"hostPort" mapstructure:"hostPort"`
Namespace string `yaml:"namespace" mapstructure:"namespace"`
MetricsListenAddress string `yaml:"metricsListenAddress" mapstructure:"metricsListenAddress"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type DashboardStats ¶ added in v2.3.0
type DashboardStats struct {
TotalRunning int64
TotalCompleted int64
TotalFailed int64
TotalCanceled int64
TotalTerminated int64
AverageDuration time.Duration
}
DashboardStats provides aggregated workflow statistics
type ScheduleManager ¶
type ScheduleManager struct {
// contains filtered or unexported fields
}
func NewScheduleManager ¶
func NewScheduleManager(clientOrConfig interface{}) *ScheduleManager
func (*ScheduleManager) Close ¶
func (sm *ScheduleManager) Close()
func (*ScheduleManager) CreateSchedule ¶
func (sm *ScheduleManager) CreateSchedule(ctx context.Context, scheduleID string, spec client.ScheduleSpec, action *client.ScheduleWorkflowAction) (client.ScheduleHandle, error)
func (*ScheduleManager) CreateScheduleWithOptions ¶
func (sm *ScheduleManager) CreateScheduleWithOptions(ctx context.Context, options client.ScheduleOptions) (client.ScheduleHandle, error)
func (*ScheduleManager) CreateWorkflowSchedule ¶
func (sm *ScheduleManager) CreateWorkflowSchedule(ctx context.Context, scheduleName string, options WorkflowScheduleOptions) (client.ScheduleHandle, error)
func (*ScheduleManager) DeleteSchedule ¶
func (sm *ScheduleManager) DeleteSchedule(ctx context.Context, scheduleID string) error
DeleteSchedule deletes a specific schedule by ID
func (*ScheduleManager) DeleteSchedules ¶
func (sm *ScheduleManager) DeleteSchedules(ctx context.Context) error
func (*ScheduleManager) GetClient ¶
func (sm *ScheduleManager) GetClient() client.Client
func (*ScheduleManager) GetSchedule ¶
func (sm *ScheduleManager) GetSchedule(ctx context.Context, scheduleID string) (client.ScheduleHandle, error)
GetSchedule retrieves a schedule handle by ID
func (*ScheduleManager) GetScheduleHandlers ¶
func (sm *ScheduleManager) GetScheduleHandlers() map[string]client.ScheduleHandle
func (*ScheduleManager) ListSchedules ¶
func (sm *ScheduleManager) ListSchedules(ctx context.Context, limit int) ([]*client.ScheduleListEntry, error)
ListSchedules lists all schedules with a limit
func (*ScheduleManager) UpdateSchedule ¶
func (sm *ScheduleManager) UpdateSchedule(ctx context.Context, scheduleID string, spec client.ScheduleSpec, action *client.ScheduleWorkflowAction) error
UpdateSchedule updates an existing schedule
type WorkerManager ¶
type WorkerManager struct {
// contains filtered or unexported fields
}
func NewWorkerManager ¶
func NewWorkerManager(config *Config) (*WorkerManager, error)
func (*WorkerManager) Close ¶
func (wm *WorkerManager) Close()
func (*WorkerManager) GetClient ¶
func (wm *WorkerManager) GetClient() client.Client
func (*WorkerManager) GetWorkers ¶
func (wm *WorkerManager) GetWorkers() []worker.Worker
type WorkflowDetails ¶ added in v2.3.0
type WorkflowDetails struct {
WorkflowID string
RunID string
WorkflowType string
Status enums.WorkflowExecutionStatus
StartTime time.Time
CloseTime time.Time
ExecutionTime time.Duration
HistoryLength int64
}
WorkflowDetails contains detailed information about a workflow execution
type WorkflowFilter ¶ added in v2.3.0
type WorkflowFilter struct {
WorkflowType string
WorkflowID string
Status []enums.WorkflowExecutionStatus
StartTimeRange *TimeRange
Query string // Advanced visibility query
}
WorkflowFilter defines criteria for filtering workflows
type WorkflowManager ¶ added in v2.3.0
type WorkflowManager struct {
// contains filtered or unexported fields
}
WorkflowManager provides workflow query and management operations
func NewWorkflowManager ¶ added in v2.3.0
func NewWorkflowManager(clientOrConfig interface{}) (*WorkflowManager, error)
NewWorkflowManager creates a new WorkflowManager instance Accepts either a client.Client or *Config
func (*WorkflowManager) CancelWorkflow ¶ added in v2.3.0
func (wm *WorkflowManager) CancelWorkflow(ctx context.Context, workflowID, runID string) error
CancelWorkflow cancels a running workflow execution
func (*WorkflowManager) Close ¶ added in v2.3.0
func (wm *WorkflowManager) Close()
Close closes the Workflow Manager and its client if it was created by the manager
func (*WorkflowManager) CountWorkflows ¶ added in v2.3.0
CountWorkflows counts workflows matching a query
func (*WorkflowManager) DescribeWorkflow ¶ added in v2.3.0
func (wm *WorkflowManager) DescribeWorkflow(ctx context.Context, workflowID, runID string) (*WorkflowDetails, error)
DescribeWorkflow retrieves detailed information about a specific workflow execution
func (*WorkflowManager) GetClient ¶ added in v2.3.0
func (wm *WorkflowManager) GetClient() client.Client
GetClient returns the underlying Temporal client
func (*WorkflowManager) GetDashboardStats ¶ added in v2.3.0
func (wm *WorkflowManager) GetDashboardStats(ctx context.Context) (*DashboardStats, error)
GetDashboardStats retrieves aggregated statistics for all workflows
func (*WorkflowManager) GetRecentWorkflows ¶ added in v2.3.0
func (wm *WorkflowManager) GetRecentWorkflows(ctx context.Context, limit int) ([]*WorkflowDetails, error)
GetRecentWorkflows retrieves the most recent workflow executions
func (*WorkflowManager) GetWorkflowHistory ¶ added in v2.3.0
func (wm *WorkflowManager) GetWorkflowHistory(ctx context.Context, workflowID, runID string) (*workflowservice.GetWorkflowExecutionHistoryResponse, error)
GetWorkflowHistory retrieves the event history of a workflow execution
func (*WorkflowManager) GetWorkflowResult ¶ added in v2.3.0
func (wm *WorkflowManager) GetWorkflowResult(ctx context.Context, workflowID, runID string, valuePtr interface{}) error
GetWorkflowResult retrieves the result of a completed workflow
func (*WorkflowManager) GetWorkflowStatus ¶ added in v2.3.0
func (wm *WorkflowManager) GetWorkflowStatus(ctx context.Context, workflowID, runID string) (enums.WorkflowExecutionStatus, error)
GetWorkflowStatus returns the current status of a workflow execution
func (*WorkflowManager) ListCompletedWorkflows ¶ added in v2.3.0
func (wm *WorkflowManager) ListCompletedWorkflows(ctx context.Context, pageSize int) ([]*WorkflowDetails, error)
ListCompletedWorkflows returns completed workflows
func (*WorkflowManager) ListFailedWorkflows ¶ added in v2.3.0
func (wm *WorkflowManager) ListFailedWorkflows(ctx context.Context, pageSize int) ([]*WorkflowDetails, error)
ListFailedWorkflows returns failed workflows
func (*WorkflowManager) ListRunningWorkflows ¶ added in v2.3.0
func (wm *WorkflowManager) ListRunningWorkflows(ctx context.Context, pageSize int) ([]*WorkflowDetails, error)
ListRunningWorkflows returns all currently running workflows
func (*WorkflowManager) ListWorkflows ¶ added in v2.3.0
func (wm *WorkflowManager) ListWorkflows(ctx context.Context, pageSize int, query string) ([]*WorkflowDetails, error)
ListWorkflows lists workflows with pagination and optional query filter
func (*WorkflowManager) ListWorkflowsByStatus ¶ added in v2.3.0
func (wm *WorkflowManager) ListWorkflowsByStatus(ctx context.Context, status enums.WorkflowExecutionStatus, pageSize int) ([]*WorkflowDetails, error)
ListWorkflowsByStatus lists workflows filtered by execution status
func (*WorkflowManager) QueryWorkflow ¶ added in v2.3.0
func (wm *WorkflowManager) QueryWorkflow(ctx context.Context, workflowID, runID, queryType string, args ...interface{}) (interface{}, error)
QueryWorkflow queries a running workflow for custom data
func (*WorkflowManager) SearchWorkflowsByID ¶ added in v2.3.0
func (wm *WorkflowManager) SearchWorkflowsByID(ctx context.Context, workflowIDPrefix string, pageSize int) ([]*WorkflowDetails, error)
SearchWorkflowsByID searches for workflows matching a workflow ID pattern
func (*WorkflowManager) SearchWorkflowsByType ¶ added in v2.3.0
func (wm *WorkflowManager) SearchWorkflowsByType(ctx context.Context, workflowType string, pageSize int) ([]*WorkflowDetails, error)
SearchWorkflowsByType searches workflows by workflow type name
func (*WorkflowManager) SignalWorkflow ¶ added in v2.3.0
func (wm *WorkflowManager) SignalWorkflow(ctx context.Context, workflowID, runID, signalName string, arg interface{}) error
SignalWorkflow sends a signal to a running workflow
func (*WorkflowManager) TerminateWorkflow ¶ added in v2.3.0
func (wm *WorkflowManager) TerminateWorkflow(ctx context.Context, workflowID, runID, reason string) error
TerminateWorkflow terminates a workflow execution with a reason
type ZerologAdapter ¶
type ZerologAdapter struct {
// contains filtered or unexported fields
}
func NewZerologAdapter ¶
func NewZerologAdapter(logger zerolog.Logger) *ZerologAdapter
NewZerologAdapter creates a new ZerologAdapter
func (*ZerologAdapter) Debug ¶
func (z *ZerologAdapter) Debug(msg string, keyvals ...interface{})
func (*ZerologAdapter) Error ¶
func (z *ZerologAdapter) Error(msg string, keyvals ...interface{})
func (*ZerologAdapter) Info ¶
func (z *ZerologAdapter) Info(msg string, keyvals ...interface{})
func (*ZerologAdapter) Warn ¶
func (z *ZerologAdapter) Warn(msg string, keyvals ...interface{})
func (*ZerologAdapter) With ¶
func (z *ZerologAdapter) With(keyvals ...interface{}) temporallog.Logger
func (*ZerologAdapter) WithCallerSkip ¶
func (z *ZerologAdapter) WithCallerSkip(skip int) temporallog.Logger