client

package
v1.0.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyProvider

type APIKeyProvider struct {
	APIKey    string
	Namespace string
}

APIKeyProvider provides headers for API key authentication

func (*APIKeyProvider) GetHeaders

func (a *APIKeyProvider) GetHeaders(_ context.Context) (map[string]string, error)

GetHeaders implements client.HeadersProvider using existing constants

type TemporalClient

type TemporalClient interface {
	// Core client operations
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	IsHealthy(ctx context.Context) bool

	// Workflow operations
	StartWorkflow(ctx context.Context, options models.StartWorkflowOptions, workflow interface{}, args ...interface{}) (models.WorkflowRun, error)
	SignalWorkflow(ctx context.Context, workflowID, runID, signalName string, arg interface{}) error
	QueryWorkflow(ctx context.Context, workflowID, runID, queryType string, args ...interface{}) (interface{}, error)
	CancelWorkflow(ctx context.Context, workflowID, runID string) error
	TerminateWorkflow(ctx context.Context, workflowID, runID, reason string, details ...interface{}) error

	// Activity operations
	CompleteActivity(ctx context.Context, taskToken []byte, result interface{}, err error) error
	RecordActivityHeartbeat(ctx context.Context, taskToken []byte, details ...interface{}) error

	// Utility operations
	GetWorkflowHistory(ctx context.Context, workflowID, runID string) (client.HistoryEventIterator, error)
	DescribeWorkflowExecution(ctx context.Context, workflowID, runID string) (*workflowservice.DescribeWorkflowExecutionResponse, error)

	// Schedule operations
	CreateSchedule(ctx context.Context, options models.CreateScheduleOptions) (models.ScheduleHandle, error)
	GetScheduleHandle(ctx context.Context, scheduleID string) models.ScheduleHandle

	// Raw client access (for advanced use cases)
	GetRawClient() client.Client
}

TemporalClient is the interface for interacting with Temporal service

func NewTemporalClient

func NewTemporalClient(options *models.ClientOptions, logger *logger.Logger) (TemporalClient, error)

NewTemporalClient creates a new temporal client instance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL