temporal

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWorkflowsAndActivities

func RegisterWorkflowsAndActivities(w worker.Worker)

RegisterWorkflowsAndActivities registers all workflows and activities with a Temporal worker.

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

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service handles Temporal workflow operations

func NewService

func NewService(client *TemporalClient, cfg *config.TemporalConfig, log *logger.Logger) (*Service, error)

NewService creates a new Temporal service

func (*Service) Close

func (s *Service) Close()

Close closes the temporal client

func (*Service) StartBillingWorkflow

func (s *Service) StartBillingWorkflow(ctx context.Context, input models.BillingWorkflowInput) (*models.BillingWorkflowResult, error)

StartBillingWorkflow starts a billing workflow

type TemporalClient

type TemporalClient struct {
	Client client.Client
}

TemporalClient wraps the Temporal SDK client for application use.

func NewTemporalClient

func NewTemporalClient(cfg *config.TemporalConfig, log *logger.Logger) (*TemporalClient, error)

NewTemporalClient creates a new Temporal client using the given configuration.

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker manages the Temporal worker instance.

func NewWorker

func NewWorker(client *TemporalClient, cfg config.TemporalConfig, log *logger.Logger) *Worker

NewWorker creates a new Temporal worker and registers workflows and activities.

func (*Worker) RegisterWithLifecycle

func (w *Worker) RegisterWithLifecycle(lc fx.Lifecycle)

RegisterWithLifecycle registers the worker with the fx lifecycle.

func (*Worker) Start

func (w *Worker) Start() error

Start starts the Temporal worker.

func (*Worker) Stop

func (w *Worker) Stop()

Stop stops the Temporal worker.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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