temporalclient

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configs = configset.Set[Config]{
	Default: &Config{
		CheckHealthInterval: time.Minute,
		CheckHealthTimeout:  10 * time.Second,
		LogLevel:            zap.NewAtomicLevelAt(zapcore.WarnLevel),
	},
	Dev: &Config{
		CheckHealthInterval: time.Minute,
		CheckHealthTimeout:  10 * time.Second,
		LogLevel:            zap.NewAtomicLevelAt(zapcore.WarnLevel),

		StartDevServerIfNotUp: true,
		DevServer: testsuite.DevServerOptions{
			LogLevel: zapcore.WarnLevel.String(),
		},
	},
	Test: &Config{
		CheckHealthInterval: time.Minute,
		CheckHealthTimeout:  10 * time.Second,
		LogLevel:            zap.NewAtomicLevelAt(zapcore.WarnLevel),

		AlwaysStartDevServer: true,
		DevServer: testsuite.DevServerOptions{
			LogLevel: zapcore.WarnLevel.String(),
		},
	},
}

Functions

func NewWorkflowContextAsGOContext

func NewWorkflowContextAsGOContext(ctx workflow.Context) context.Context

Types

type Client

type Client interface {
	Start(context.Context) error
	Stop(context.Context) error
	Temporal() client.Client
}

func New

func New(cfg *Config, z *zap.Logger) (Client, error)

type Config

type Config struct {
	AlwaysStartDevServer  bool            `koanf:"always_start_dev_server"`
	StartDevServerIfNotUp bool            `koanf:"start_dev_server_if_not_up"`
	HostPort              string          `koanf:"hostport"`
	Namespace             string          `koanf:"namespace"`
	CheckHealthInterval   time.Duration   `koanf:"check_health_interval"`
	CheckHealthTimeout    time.Duration   `koanf:"check_health_timeout"`
	LogLevel              zap.AtomicLevel `koanf:"log_level"`

	// DevServer.ClientOptions is not used.
	DevServer testsuite.DevServerOptions `koanf:"dev_server"`
}

type WorkflowContextAsGoContext

type WorkflowContextAsGoContext struct {
	workflow.Context
	// contains filtered or unexported fields
}

func (*WorkflowContextAsGoContext) Deadline

func (wctx *WorkflowContextAsGoContext) Deadline() (time.Time, bool)

func (*WorkflowContextAsGoContext) Done

func (wctx *WorkflowContextAsGoContext) Done() <-chan struct{}

func (*WorkflowContextAsGoContext) Err

func (wctx *WorkflowContextAsGoContext) Err() error

func (*WorkflowContextAsGoContext) Value

func (wctx *WorkflowContextAsGoContext) Value(key any) any

Jump to

Keyboard shortcuts

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