temporalclient

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Configs = configset.Set[Config]{
		Default: &Config{
			Monitor: defaultMonitorConfig,
		},
		Dev: &Config{
			Monitor:               defaultMonitorConfig,
			StartDevServerIfNotUp: true,
			DevServer: testsuite.DevServerOptions{
				LogLevel:   zapcore.WarnLevel.String(),
				EnableUI:   true,
				DBFilename: filepath.Join(xdg.DataHomeDir(), "temporal_dev.sqlite"),
			},
			EnableHelperRedirect: true,
		},
		Test: &Config{
			Monitor:              defaultMonitorConfig,
			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
	TemporalAddr() (frontend, ui string)
	healthreporter.HealthReporter
}

func New

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

func NewFromClient added in v0.3.1

func NewFromClient(cfg *MonitorConfig, z *zap.Logger, tclient client.Client) (Client, error)

type Config

type Config struct {
	Monitor MonitorConfig `koanf:"monitor"`

	AlwaysStartDevServer  bool   `koanf:"always_start_dev_server"`
	StartDevServerIfNotUp bool   `koanf:"start_dev_server_if_not_up"`
	HostPort              string `koanf:"hostport"`
	Namespace             string `koanf:"namespace"`

	// DevServer.ClientOptions is not used.
	DevServer testsuite.DevServerOptions `koanf:"dev_server"`
	TLS       tlsConfig                  `koanf:"tls"`

	EnableHelperRedirect bool `koanf:"enable_helper_redirect"`
}

type MonitorConfig added in v0.3.1

type MonitorConfig struct {
	CheckHealthInterval time.Duration   `koanf:"check_health_interval"`
	CheckHealthTimeout  time.Duration   `koanf:"check_health_timeout"`
	LogLevel            zap.AtomicLevel `koanf:"log_level"`
}

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