config

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultWorkflowConfig = &iwfidl.WorkflowConfig{
	ContinueAsNewThreshold:       iwfidl.PtrInt32(100),
	DisableSystemSearchAttribute: iwfidl.PtrBool(true),
}

Functions

func GetApiServiceAddressWithDefault added in v1.5.0

func GetApiServiceAddressWithDefault(config Config) string

Types

type ApiConfig

type ApiConfig struct {
	// Port is the port on which the API service will bind to
	Port           int   `yaml:"port"`
	MaxWaitSeconds int64 `yaml:"maxWaitSeconds"`
}

type CadenceConfig

type CadenceConfig struct {
	// HostPort to connect to, default to 127.0.0.1:7833
	HostPort string `yaml:"hostPort"`
	// Domain to connect to, default to default
	Domain        string `yaml:"domain"`
	WorkerOptions *cadenceWorker.Options
}

type Config

type Config struct {
	// Log is the logging config
	Log Logger `yaml:"log"`
	// Api is the API config
	Api ApiConfig `yaml:"api"`
	// Interpreter is the service behind, either Cadence or Temporal is required
	Interpreter Interpreter `yaml:"interpreter"`
}

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig returns a new decoded Config struct

type DumpWorkflowInternalActivityConfig added in v1.5.0

type DumpWorkflowInternalActivityConfig struct {
	StartToCloseTimeout time.Duration
	RetryPolicy         *iwfidl.RetryPolicy
}

type Interpreter added in v1.5.0

type Interpreter struct {
	// Temporal config is the config to connect to Temporal
	Temporal *TemporalConfig `yaml:"temporal"`
	// Cadence config is the config to connect to Cadence
	Cadence                   *CadenceConfig            `yaml:"cadence"`
	DefaultWorkflowConfig     *iwfidl.WorkflowConfig    `json:"defaultWorkflowConfig"`
	InterpreterActivityConfig InterpreterActivityConfig `yaml:"interpreterActivityConfig"`
	VerboseDebug              bool
	FailAtMemoIncompatibility bool
}

type InterpreterActivityConfig added in v1.5.0

type InterpreterActivityConfig struct {
	// ApiServiceAddress is the address that core engine workflow talks to API service
	// It's used in DumpWorkflowInternal activity for continueAsNew
	// default is http://localhost:ApiConfig.Port
	ApiServiceAddress                  string                              `json:"serviceAddress"`
	DumpWorkflowInternalActivityConfig *DumpWorkflowInternalActivityConfig `json:"dumpWorkflowInternalActivityConfig"`
}

type Logger

type Logger struct {
	// Stdout is true then the output needs to goto standard out
	// By default this is false and output will go to standard error
	Stdout bool `yaml:"stdout"`
	// Level is the desired log level
	Level string `yaml:"level"`
	// OutputFile is the path to the log output file
	// Stdout must be false, otherwise Stdout will take precedence
	OutputFile string `yaml:"outputFile"`
	// LevelKey is the desired log level, defaults to "level"
	LevelKey string `yaml:"levelKey"`
	// Encoding decides the format, supports "console" and "json".
	// "json" will print the log in JSON format(better for machine), while "console" will print in plain-text format(more human friendly)
	// Default is "json"
	Encoding string `yaml:"encoding"`
}

Logger contains the config items for logger

func (*Logger) NewZapLogger

func (cfg *Logger) NewZapLogger() (*zap.Logger, error)

NewZapLogger builds and returns a new Zap logger for this logging configuration

type TemporalConfig

type TemporalConfig struct {
	// HostPort to connect to, default to localhost:7233
	HostPort string `yaml:"hostPort"`
	// Namespace to connect to, default to default
	Namespace string `yaml:"namespace"`
	// Prometheus is configuring the metric exposer
	Prometheus    *prometheus.Configuration `yaml:"prometheus"`
	WorkerOptions *temporalWorker.Options
}

Jump to

Keyboard shortcuts

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