temporal

package
v1.45.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ClientProvider added in v1.26.2

func ClientProvider(params ProviderParameters) (client.Client, error)

func ExtractLoggerMetadata

func ExtractLoggerMetadata(header *common.Header) (map[string]string, error)

func InitializeTestWorkflowEnvironmentContextWithPrincipal added in v1.42.0

func InitializeTestWorkflowEnvironmentContextWithPrincipal(env *testsuite.TestWorkflowEnvironment, principal iam.ArmoryCloudPrincipal) error

InitializeTestWorkflowEnvironmentContextWithPrincipal should only be used in tests.

func NewLoggerContextPropagator

func NewLoggerContextPropagator() workflow.ContextPropagator

func NewPrincipalContextPropagator added in v1.42.0

func NewPrincipalContextPropagator() workflow.ContextPropagator

func TrackFinishedActivity added in v1.30.0

func TrackFinishedActivity[T any](ctx workflow.Context, activityName string, activityRunner func() ActivityResult[T]) (T, error)

func TrackFinishedWorkflow added in v1.30.0

func TrackFinishedWorkflow(ctx workflow.Context, workflowStatus string)

func WithFields

func WithFields(ctx context.Context, fields ...LoggerField) context.Context

func WithObservabilityParameters added in v1.30.0

func WithObservabilityParameters(ctx context.Context, entries ...string) context.Context

func WithWorkflowFields

func WithWorkflowFields(ctx workflow.Context, fields ...LoggerField) workflow.Context

func WithWorkflowObservabilityParameters added in v1.30.0

func WithWorkflowObservabilityParameters(ctx workflow.Context, entries ...string) workflow.Context

Types

type ActivityResult added in v1.30.0

type ActivityResult[T any] struct {
	Result   T
	Err      error
	Attempts int
	Status   string
}

func NewActivityErrorResult added in v1.30.0

func NewActivityErrorResult[T any](err error, attempts int, status string) ActivityResult[T]

func NewActivitySuccessResult added in v1.30.0

func NewActivitySuccessResult[T any](result T, attempts int, status string) ActivityResult[T]

type Configuration

type Configuration struct {
	Namespace                   string
	Hostname                    string
	Port                        string
	CertPath                    string
	KeyPath                     string
	TemporalCloudEnabled        bool
	TemporalCloudAccountID      string
	ClientSideEncryptionEnabled bool
	ClientSideEncryptionCMKARNs string
}

type LoggerField

type LoggerField struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type ProviderParameters added in v1.26.0

type ProviderParameters struct {
	fx.In

	Logger         *zap.SugaredLogger
	Config         Configuration
	MetricsService metrics.MetricsSvc          `optional:"true"`
	Tracing        opentelemetry.Configuration `optional:"true"`
}

type WorkerProvider added in v1.26.2

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

func WorkerProviderProvider added in v1.26.2

func WorkerProviderProvider(tracingConfig opentelemetry.Configuration) WorkerProvider

func (*WorkerProvider) NewWorker added in v1.26.2

func (w *WorkerProvider) NewWorker(c client.Client, taskQueue string) (worker.Worker, error)

func (*WorkerProvider) NewWorkerWithOptions added in v1.43.0

func (w *WorkerProvider) NewWorkerWithOptions(c client.Client, taskQueue string, options *worker.Options) (worker.Worker, error)

type ZapAdapter

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

func NewZapAdapter

func NewZapAdapter(zapLogger *zap.Logger) *ZapAdapter

func (*ZapAdapter) Debug

func (log *ZapAdapter) Debug(msg string, keyvals ...interface{})

func (*ZapAdapter) Error

func (log *ZapAdapter) Error(msg string, keyvals ...interface{})

func (*ZapAdapter) Info

func (log *ZapAdapter) Info(msg string, keyvals ...interface{})

func (*ZapAdapter) Warn

func (log *ZapAdapter) Warn(msg string, keyvals ...interface{})

func (*ZapAdapter) With

func (log *ZapAdapter) With(keyvals ...interface{}) log.Logger

Jump to

Keyboard shortcuts

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