Documentation
¶
Index ¶
- Constants
- Variables
- type ApiConfig
- type BlobStorageConfig
- type CadenceConfig
- type Config
- type DumpWorkflowInternalActivityConfig
- type ExternalStorageConfig
- type Interpreter
- type InterpreterActivityConfig
- type Logger
- type QueryWorkflowFailedRetryPolicy
- type StorageStatus
- type StorageType
- type TemporalConfig
- type WaitForStateCompletionMigration
Constants ¶
View Source
const ( StorageStatusActive = "active" StorageStatusInactive = "inactive" )
View Source
const (
StorageTypeS3 = "s3"
)
Variables ¶
View Source
var DefaultWorkflowConfig = &iwfidl.WorkflowConfig{ ContinueAsNewThreshold: iwfidl.PtrInt32(100), }
Functions ¶
This section is empty.
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"`
// omitRpcInputOutputInHistory is the flag to omit rpc input/output in history
// the input/output is only for debugging purpose but could be too expensive to store
OmitRpcInputOutputInHistory *bool `yaml:"omitRpcInputOutputInHistory"`
// WaitForStateCompletionMigration is used to control workflowId of the WaitForStateCompletion system/internal workflows
WaitForStateCompletionMigration WaitForStateCompletionMigration `yaml:"waitForStateCompletionMigration"`
QueryWorkflowFailedRetryPolicy QueryWorkflowFailedRetryPolicy `yaml:"queryWorkflowFailedRetryPolicy"`
}
type BlobStorageConfig ¶ added in v1.18.4
type BlobStorageConfig struct {
// Status means whether this storage is active for writing.
// Only one of the supported storages can be active
Status StorageStatus
// StorageId is the id of the external storage, it's used to identify the external storage in the EncodedObject that is stored in the workflow history
StorageId string `yaml:"storageId"`
// StorageType is the type of the external storage, currently only s3 is supported
StorageType StorageType `yaml:"storageType"`
// S3Endpoint is the endpoint of s3 service
S3Endpoint string `yaml:"s3Endpoint"`
// S3Bucket is the bucket name of the S3 storage
S3Bucket string `yaml:"s3Bucket"`
// S3Region is the region of the S3 storage
S3Region string `yaml:"s3Region"`
// S3AccessKey is the access key of the S3 storage
S3AccessKey string `yaml:"s3AccessKey"`
// S3SecretKey is the secret key of the S3 storage
S3SecretKey string `yaml:"s3SecretKey"`
// CleanupCronSchedule is the cron schedule to run the cleanup workflow
// The format is the standard cron "0 0 * * *" (see https://crontab.guru/every-day)
// If empty, the cleanup workflow will not be started
CleanupCronSchedule string `yaml:"cleanupCronSchedule"`
}
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"`
// ExternalStorage is the external storage config
ExternalStorage ExternalStorageConfig `yaml:"externalStorage"`
}
func (Config) GetApiServiceAddressWithDefault ¶ added in v1.11.0
func (Config) GetSignalWithStartOnWithDefault ¶ added in v1.11.0
func (Config) GetWaitForOnWithDefault ¶ added in v1.11.0
type DumpWorkflowInternalActivityConfig ¶
type DumpWorkflowInternalActivityConfig struct {
StartToCloseTimeout time.Duration
RetryPolicy *iwfidl.RetryPolicy
}
type ExternalStorageConfig ¶ added in v1.18.4
type ExternalStorageConfig struct {
Enabled bool `yaml:"enabled"`
// ThresholdInBytes is the size threshold of encodedObject
// that will be stored by external storage(picking the current active one)
ThresholdInBytes int `yaml:"thresholdInBytes"`
// SupportedStorages is the list of supported storage
// Only one can be active, meaning the one that will be used for writing.
// The non-active ones are for read only.
SupportedStorages []BlobStorageConfig `yaml:"supportedStorages"`
// MinAgeForCleanupCheckInDays is for checking whether the objects can be deleted.
// if objects' createdTime > now-config value, we will stop checking.
// This can be the configured retention in temporal namespace/Cadence domain
MinAgeForCleanupCheckInDays int `yaml:"minAgeForCleanupCheckInDays"`
}
type Interpreter ¶
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 ¶
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"`
DefaultHeaders map[string]string `json:"defaultHeaders"`
}
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
type QueryWorkflowFailedRetryPolicy ¶ added in v1.14.1
type QueryWorkflowFailedRetryPolicy struct {
// defaults to 1
InitialIntervalSeconds int `yaml:"initialIntervalSeconds"`
// defaults to 5
MaximumAttempts int `yaml:"maximumAttempts"`
}
func QueryWorkflowFailedRetryPolicyWithDefaults ¶ added in v1.14.1
func QueryWorkflowFailedRetryPolicyWithDefaults(retryPolicy *QueryWorkflowFailedRetryPolicy) QueryWorkflowFailedRetryPolicy
type StorageStatus ¶ added in v1.18.4
type StorageStatus string
type StorageType ¶ added in v1.18.4
type StorageType string
type TemporalConfig ¶
type TemporalConfig struct {
// HostPort to connect to, default to localhost:7233
HostPort string `yaml:"hostPort"`
// API key to connect to Temporal Cloud, default to empty
CloudAPIKey string `yaml:"cloudAPIKey"`
// 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
}
type WaitForStateCompletionMigration ¶ added in v1.11.0
Click to show internal directories.
Click to hide internal directories.