config

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvKeyRoot the environment variable key for runtime root dir
	EnvKeyRoot = "CADENCE_ROOT"
	// EnvKeyConfigDir the environment variable key for config dir
	EnvKeyConfigDir = "CADENCE_CONFIG_DIR"
	// EnvKeyEnvironment is the environment variable key for environment
	EnvKeyEnvironment = "CADENCE_ENVIRONMENT"
	// EnvKeyAvailabilityZone is the environment variable key for AZ
	EnvKeyAvailabilityZone = "CADENCE_AVAILABILTY_ZONE"
)
View Source
const (
	// StoreTypeSQL refers to sql based storage as persistence store
	StoreTypeSQL = "sql"
	// StoreTypeCassandra refers to cassandra as persistence store
	StoreTypeCassandra = "cassandra"
)

Variables

CadenceServices indicate the list of cadence services

Functions

func CheckAWSSigningConfig added in v0.19.0

func CheckAWSSigningConfig(config AWSSigning) error

CheckAWSSigningConfig checks if the AWSSigning configuration is valid

func ListenIP added in v0.3.2

func ListenIP() (net.IP, error)

ListenIP returns the IP to bind to in Listen. It tries to find an IP that can be used by other machines to reach this machine.

func Load

func Load(env string, configDir string, zone string, config interface{}) error

Load loads the configuration from a set of yaml config files found in the config directory

The loader first fetches the set of files matching a pre-determined naming convention, then sorts them by hierarchy order and after that, simply loads the files one after another with the key/values in the later files overriding the key/values in the earlier files

The hierarchy is as follows from lowest to highest

base.yaml
    env.yaml   -- environment is one of the input params ex-development
      env_az.yaml -- zone is another input param

Types

type AWSEnvironmentCredential added in v0.19.0

type AWSEnvironmentCredential struct {
	Region string `yaml:"region"`
}

AWSEnvironmentCredential will make a new Session created from SDK defaults, config files, environment, and user provided config files. See more in https://github.com/aws/aws-sdk-go/blob/3974dd034387fbc7cf09c8cd2400787ce07f3285/aws/session/session.go#L147

type AWSSigning added in v0.19.0

type AWSSigning struct {
	Enable                bool                      `yaml:"enable"`
	StaticCredential      *AWSStaticCredential      `yaml:"staticCredential"`
	EnvironmentCredential *AWSEnvironmentCredential `yaml:"environmentCredential"`
}

AWSSigning contains config to enable signing, Must provide either StaticCredential or EnvironmentCredential

type AWSStaticCredential added in v0.19.0

type AWSStaticCredential struct {
	AccessKey    string `yaml:"accessKey"`
	SecretKey    string `yaml:"secretKey"`
	Region       string `yaml:"region"`
	SessionToken string `yaml:"sessionToken"`
}

AWSStaticCredential to create a static credentials value provider. SessionToken is only required for temporary security credentials retrieved via STS, otherwise an empty string can be passed for this parameter. See more in https://github.com/aws/aws-sdk-go/blob/master/aws/credentials/static_provider.go#L21

type Archival added in v0.5.0

type Archival struct {
	// History is the config for the history archival
	History HistoryArchival `yaml:"history"`
	// Visibility is the config for visibility archival
	Visibility VisibilityArchival `yaml:"visibility"`
}

Archival contains the config for archival

func (*Archival) Validate added in v0.8.3

func (a *Archival) Validate(domainDefaults *ArchivalDomainDefaults) error

Validate validates the archival config

type ArchivalDomainDefaults added in v0.7.0

type ArchivalDomainDefaults struct {
	// History is the domain default history archival config for each domain
	History HistoryArchivalDomainDefaults `yaml:"history"`
	// Visibility is the domain default visibility archival config for each domain
	Visibility VisibilityArchivalDomainDefaults `yaml:"visibility"`
}

ArchivalDomainDefaults is the default archival config for each domain

type Blobstore added in v0.13.0

type Blobstore struct {
	Filestore *FileBlobstore `yaml:"filestore"`
}

Blobstore contains the config for blobstore

type BootstrapMode

type BootstrapMode int

BootstrapMode is an enum type for ringpop bootstrap mode

const (
	// BootstrapModeNone represents a bootstrap mode set to nothing or invalid
	BootstrapModeNone BootstrapMode = iota
	// BootstrapModeFile represents a file-based bootstrap mode
	BootstrapModeFile
	// BootstrapModeHosts represents a list of hosts passed in the configuration
	BootstrapModeHosts
	// BootstrapModeCustom represents a custom bootstrap mode
	BootstrapModeCustom
	// BootstrapModeDNS represents a list of hosts passed in the configuration
	// to be resolved, and the resulting addresses are used for bootstrap
	BootstrapModeDNS
)

func (*BootstrapMode) UnmarshalYAML

func (m *BootstrapMode) UnmarshalYAML(
	unmarshal func(interface{}) error,
) error

UnmarshalYAML is called by the yaml package to convert the config YAML into a BootstrapMode.

type Cassandra

type Cassandra struct {
	// Hosts is a csv of cassandra endpoints
	Hosts string `yaml:"hosts" validate:"nonzero"`
	// Port is the cassandra port used for connection by gocql client
	Port int `yaml:"port"`
	// User is the cassandra user used for authentication by gocql client
	User string `yaml:"user"`
	// Password is the cassandra password used for authentication by gocql client
	Password string `yaml:"password"`
	// Keyspace is the cassandra keyspace
	Keyspace string `yaml:"keyspace" validate:"nonzero"`
	// Region is the region filter arg for cassandra
	Region string `yaml:"region"`
	// Datacenter is the data center filter arg for cassandra
	Datacenter string `yaml:"datacenter"`
	// MaxConns is the max number of connections to this datastore for a single keyspace
	MaxConns int `yaml:"maxConns"`
	// TLS configuration
	TLS *auth.TLS `yaml:"tls"`
	// CQLClient specifies a custom CQL client implementation, can not be specified through yaml
	CQLClient gocql.Client `yaml:"-" json:"-"`
}

Cassandra contains configuration to connect to Cassandra cluster

type ClusterConfig added in v0.18.0

type ClusterConfig struct {
	Brokers []string `yaml:"brokers"`
}

ClusterConfig describes the configuration for a single Kafka cluster

type ClusterInformation added in v0.5.8

type ClusterInformation struct {
	Enabled                bool  `yaml:"enabled"`
	InitialFailoverVersion int64 `yaml:"initialFailoverVersion"`
	// RPCName indicate the remote service name
	RPCName string `yaml:"rpcName"`
	// Address indicate the remote service address(Host:Port). Host can be DNS name.
	RPCAddress string `yaml:"rpcAddress"`
}

ClusterInformation contains the information about each cluster which participated in cross DC

type ClusterMetadata added in v0.5.8

type ClusterMetadata struct {
	EnableGlobalDomain bool `yaml:"enableGlobalDomain"`
	// FailoverVersionIncrement is the increment of each cluster version when failover happens
	FailoverVersionIncrement int64 `yaml:"failoverVersionIncrement"`
	// MasterClusterName is the master cluster name, only the master cluster can register / update domain
	// all clusters can do domain failover
	MasterClusterName string `yaml:"masterClusterName"`
	// CurrentClusterName is the name of the current cluster
	CurrentClusterName string `yaml:"currentClusterName"`
	// ClusterInformation contains all cluster names to corresponding information about that cluster
	ClusterInformation map[string]ClusterInformation `yaml:"clusterInformation"`
}

ClusterMetadata contains the all cluster which participated in cross DC

type Config

type Config struct {
	// Ringpop is the ringpop related configuration
	Ringpop Ringpop `yaml:"ringpop"`
	// Persistence contains the configuration for cadence datastores
	Persistence Persistence `yaml:"persistence"`
	// Log is the logging config
	Log Logger `yaml:"log"`
	// ClusterMetadata is the config containing all valid clusters and active cluster
	ClusterMetadata *ClusterMetadata `yaml:"clusterMetadata"`
	// DCRedirectionPolicy contains the frontend datacenter redirection policy
	DCRedirectionPolicy DCRedirectionPolicy `yaml:"dcRedirectionPolicy"`
	// Services is a map of service name to service config items
	Services map[string]Service `yaml:"services"`
	// Kafka is the config for connecting to kafka
	Kafka KafkaConfig `yaml:"kafka"`
	// Archival is the config for archival
	Archival Archival `yaml:"archival"`
	// PublicClient is config for connecting to cadence frontend
	PublicClient PublicClient `yaml:"publicClient"`
	// DynamicConfigClient is the config for setting up the file based dynamic config client
	// Filepath would be relative to the root directory when the path wasn't absolute.
	DynamicConfigClient dynamicconfig.FileBasedClientConfig `yaml:"dynamicConfigClient"`
	// DomainDefaults is the default config for every domain
	DomainDefaults DomainDefaults `yaml:"domainDefaults"`
	// Blobstore is the config for setting up blobstore
	Blobstore Blobstore `yaml:"blobstore"`
}

Config contains the configuration for a set of cadence services

func (*Config) String

func (c *Config) String() string

String converts the config object into a string

func (*Config) ValidateAndFillDefaults added in v0.18.0

func (c *Config) ValidateAndFillDefaults() error

ValidateAndFillDefaults validates this config and fills default values if needed

type CustomDatastoreConfig added in v0.12.0

type CustomDatastoreConfig struct {
	// Name of the custom datastore
	Name string `yaml:"name"`
	// Options is a set of key-value attributes that can be used by AbstractDatastoreFactory implementation
	Options map[string]string `yaml:"options"`
}

CustomDatastoreConfig is the configuration for connecting to a custom datastore that is not supported by cadence core

type DCRedirectionPolicy added in v0.5.2

type DCRedirectionPolicy struct {
	Policy string `yaml:"policy"`
	ToDC   string `yaml:"toDC"`
}

DCRedirectionPolicy contains the frontend datacenter redirection policy

type DataStore added in v0.4.0

type DataStore struct {
	// Cassandra contains the config for a cassandra datastore
	Cassandra *Cassandra `yaml:"cassandra"`
	// SQL contains the config for a SQL based datastore
	SQL *SQL `yaml:"sql"`
	// ElasticSearch contains the config for a ElasticSearch datastore
	ElasticSearch *ElasticSearchConfig `yaml:"elasticsearch"`
}

DataStore is the configuration for a single datastore

type DomainDefaults added in v0.7.0

type DomainDefaults struct {
	// Archival is the default archival config for each domain
	Archival ArchivalDomainDefaults `yaml:"archival"`
}

DomainDefaults is the default config for each domain

type ElasticSearchConfig added in v0.17.0

type ElasticSearchConfig struct {
	URL     url.URL           `yaml:"url"`     //nolint:govet
	Indices map[string]string `yaml:"indices"` //nolint:govet
	// supporting v6 and v7. Default to v6 if empty.
	Version string `yaml:"version"` //nolint:govet
	// optional username to communicate with ElasticSearch
	Username string `yaml:"username"` //nolint:govet
	// optional password to communicate with ElasticSearch
	Password string `yaml:"password"` //nolint:govet
	// optional to disable sniff, according to issues on Github,
	// Sniff could cause issue like "no Elasticsearch node available"
	DisableSniff bool `yaml:"disableSniff"`
	// optional to disable health check
	DisableHealthCheck bool `yaml:"disableHealthCheck"`
	// optional to use AWS signing client
	// See more info https://github.com/olivere/elastic/wiki/Using-with-AWS-Elasticsearch-Service
	AWSSigning AWSSigning `yaml:"awsSigning"`
}

ElasticSearchConfig for connecting to ElasticSearch

func (*ElasticSearchConfig) GetVisibilityIndex added in v0.17.0

func (cfg *ElasticSearchConfig) GetVisibilityIndex() string

GetVisibilityIndex return visibility index name

func (*ElasticSearchConfig) SetUsernamePassword added in v0.17.0

func (cfg *ElasticSearchConfig) SetUsernamePassword()

SetUsernamePassword set the username/password into URL It is a bit tricky here because url.URL doesn't expose the username/password in the struct because of the security concern.

type FileBlobstore added in v0.13.0

type FileBlobstore struct {
	OutputDirectory string `yaml:"outputDirectory"`
}

FileBlobstore contains the config for a file backed blobstore

type FilestoreArchiver added in v0.9.0

type FilestoreArchiver struct {
	FileMode string `yaml:"fileMode"`
	DirMode  string `yaml:"dirMode"`
}

FilestoreArchiver contain the config for filestore archiver

type GstorageArchiver added in v0.12.0

type GstorageArchiver struct {
	CredentialsPath string `yaml:"credentialsPath"`
}

GstorageArchiver contain the config for google storage archiver

type HistoryArchival added in v0.7.0

type HistoryArchival struct {
	// Status is the status of history archival either: enabled, disabled, or paused
	Status string `yaml:"status"`
	// EnableRead whether history can be read from archival
	EnableRead bool `yaml:"enableRead"`
	// Provider contains the config for all history archivers
	Provider *HistoryArchiverProvider `yaml:"provider"`
}

HistoryArchival contains the config for history archival

type HistoryArchivalDomainDefaults added in v0.7.0

type HistoryArchivalDomainDefaults struct {
	// Status is the domain default status of history archival: enabled or disabled
	Status string `yaml:"status"`
	// URI is the domain default URI for history archiver
	URI string `yaml:"URI"`
}

HistoryArchivalDomainDefaults is the default history archival config for each domain

type HistoryArchiverProvider added in v0.7.0

type HistoryArchiverProvider struct {
	Filestore *FilestoreArchiver `yaml:"filestore"`
	Gstorage  *GstorageArchiver  `yaml:"gstorage"`
	S3store   *S3Archiver        `yaml:"s3store"`
}

HistoryArchiverProvider contains the config for all history archivers

type KafkaConfig added in v0.18.0

type KafkaConfig struct {
	TLS      auth.TLS                 `yaml:"tls"`
	SASL     auth.SASL                `yaml:"sasl"`
	Clusters map[string]ClusterConfig `yaml:"clusters"`
	Topics   map[string]TopicConfig   `yaml:"topics"`
	// Applications describes the applications that will use the Kafka topics
	Applications map[string]TopicList `yaml:"applications"`
}

KafkaConfig describes the configuration needed to connect to all kafka clusters

func (*KafkaConfig) GetBrokersForKafkaCluster added in v0.18.0

func (k *KafkaConfig) GetBrokersForKafkaCluster(kafkaCluster string) []string

GetBrokersForKafkaCluster gets broker from cluster

func (*KafkaConfig) GetKafkaClusterForTopic added in v0.18.0

func (k *KafkaConfig) GetKafkaClusterForTopic(topic string) string

GetKafkaClusterForTopic gets cluster from topic

func (*KafkaConfig) GetTopicsForApplication added in v0.18.0

func (k *KafkaConfig) GetTopicsForApplication(app string) TopicList

GetTopicsForApplication gets topic from application

func (*KafkaConfig) Validate added in v0.18.0

func (k *KafkaConfig) Validate(checkApp bool)

Validate will validate config for kafka

type Logger

type Logger struct {
	// Stdout is true if the output needs to goto standard out
	Stdout bool `yaml:"stdout"`
	// Level is the desired log level
	Level string `yaml:"level"`
	// OutputFile is the path to the log output file
	OutputFile string `yaml:"outputFile"`
}

Logger contains the config items for logger

func (*Logger) NewZapLogger added in v0.5.7

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

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

type Metrics

type Metrics struct {
	// M3 is the configuration for m3 metrics reporter
	M3 *m3.Configuration `yaml:"m3"`
	// Statsd is the configuration for statsd reporter
	Statsd *Statsd `yaml:"statsd"`
	// Prometheus is the configuration for prometheus reporter
	Prometheus *prometheus.Configuration `yaml:"prometheus"`
	// Tags is the set of key-value pairs to be reported
	// as part of every metric
	Tags map[string]string `yaml:"tags"`
	// Prefix sets the prefix to all outgoing metrics
	Prefix string `yaml:"prefix"`
}

Metrics contains the config items for metrics subsystem

func (*Metrics) NewScope

func (c *Metrics) NewScope(logger log.Logger, service string) tally.Scope

NewScope builds a new tally scope for this metrics configuration

If the underlying configuration is valid for multiple reporter types, only one of them will be used for reporting. Currently, m3 is preferred over statsd

type PProf added in v0.3.5

type PProf struct {
	// Port is the port on which the PProf will bind to
	Port int `yaml:"port"`
}

PProf contains the rpc config items

func (*PProf) NewInitializer added in v0.3.5

func (cfg *PProf) NewInitializer(logger log.Logger) *PProfInitializerImpl

NewInitializer create a new instance of PProf Initializer

type PProfInitializerImpl added in v0.3.5

type PProfInitializerImpl struct {
	PProf  *PProf
	Logger log.Logger
}

PProfInitializerImpl initialize the pprof based on config

func (*PProfInitializerImpl) Start added in v0.3.5

func (initializer *PProfInitializerImpl) Start() error

Start the pprof based on config

type Persistence added in v0.4.0

type Persistence struct {
	// DefaultStore is the name of the default data store to use
	DefaultStore string `yaml:"defaultStore" validate:"nonzero"`
	// VisibilityStore is the name of the datastore to be used for visibility records
	VisibilityStore string `yaml:"visibilityStore" validate:"nonzero"`
	// AdvancedVisibilityStore is the name of the datastore to be used for visibility records
	AdvancedVisibilityStore string `yaml:"advancedVisibilityStore"`
	// HistoryMaxConns is the desired number of conns to history store. Value specified
	// here overrides the MaxConns config specified as part of datastore
	HistoryMaxConns int `yaml:"historyMaxConns"`
	// NumHistoryShards is the desired number of history shards. This config doesn't
	// belong here, needs refactoring
	NumHistoryShards int `yaml:"numHistoryShards" validate:"nonzero"`
	// DataStores contains the configuration for all datastores
	DataStores map[string]DataStore `yaml:"datastores"`
	// VisibilityConfig is config for visibility sampling
	VisibilityConfig *VisibilityConfig `yaml:"-" json:"-"`
	// TransactionSizeLimit is the largest allowed transaction size
	TransactionSizeLimit dynamicconfig.IntPropertyFn `yaml:"-" json:"-"`
	// ErrorInjectionRate is the the rate for injecting random error
	ErrorInjectionRate dynamicconfig.FloatPropertyFn `yaml:"-" json:"-"`
}

Persistence contains the configuration for data store / persistence layer

func (*Persistence) DefaultStoreType added in v0.5.7

func (c *Persistence) DefaultStoreType() string

DefaultStoreType returns the storeType for the default persistence store

func (*Persistence) IsAdvancedVisibilityConfigExist added in v0.9.0

func (c *Persistence) IsAdvancedVisibilityConfigExist() bool

IsAdvancedVisibilityConfigExist returns whether user specified advancedVisibilityStore in config

func (*Persistence) Validate added in v0.4.0

func (c *Persistence) Validate() error

Validate validates the persistence config

type PublicClient added in v0.5.7

type PublicClient struct {
	// HostPort is the host port to connect on. Host can be DNS name
	HostPort string `yaml:"hostPort" validate:"nonzero"`
	// interval to refresh DNS. Default to 10s
	RefreshInterval time.Duration `yaml:"RefreshInterval"`
}

PublicClient is config for connecting to cadence frontend

type RPC added in v0.3.2

type RPC struct {
	// Port is the port  on which the channel will bind to
	Port int `yaml:"port"`
	// BindOnLocalHost is true if localhost is the bind address
	BindOnLocalHost bool `yaml:"bindOnLocalHost"`
	// BindOnIP can be used to bind service on specific ip (eg. `0.0.0.0`) -
	// check net.ParseIP for supported syntax, only IPv4 is supported,
	// mutually exclusive with `BindOnLocalHost` option
	BindOnIP string `yaml:"bindOnIP"`
	// DisableLogging disables all logging for rpc
	DisableLogging bool `yaml:"disableLogging"`
	// LogLevel is the desired log level
	LogLevel string `yaml:"logLevel"`
}

RPC contains the rpc config items

func (*RPC) NewFactory added in v0.3.2

func (cfg *RPC) NewFactory(sName string, logger log.Logger) *RPCFactory

NewFactory builds a new RPCFactory conforming to the underlying configuration

type RPCFactory added in v0.3.2

type RPCFactory struct {
	sync.Mutex
	// contains filtered or unexported fields
}

RPCFactory is an implementation of service.RPCFactory interface

func (*RPCFactory) CreateDispatcherForOutbound added in v0.3.2

func (d *RPCFactory) CreateDispatcherForOutbound(
	callerName string,
	serviceName string,
	hostName string,
) *yarpc.Dispatcher

CreateDispatcherForOutbound creates a dispatcher for outbound connection

func (*RPCFactory) GetDispatcher added in v0.11.0

func (d *RPCFactory) GetDispatcher() *yarpc.Dispatcher

GetDispatcher return a cached dispatcher

type ReplicationTaskProcessorConfig added in v0.9.0

type ReplicationTaskProcessorConfig struct {
	NoTaskInitialWaitIntervalSecs int     `yaml:"noTaskInitialWaitIntervalSecs"`
	NoTaskWaitBackoffCoefficient  float64 `yaml:"noTaskWaitBackoffCoefficient"`
	NoTaskMaxWaitIntervalSecs     int     `yaml:"noTaskMaxWaitIntervalSecs"`
}

ReplicationTaskProcessorConfig is the config for replication task processor.

type Replicator added in v0.3.7

type Replicator struct{}

Replicator describes the configuration of replicator

type Ringpop

type Ringpop struct {
	// Name to be used in ringpop advertisement
	Name string `yaml:"name" validate:"nonzero"`
	// BootstrapMode is a enum that defines the ringpop bootstrap method
	BootstrapMode BootstrapMode `yaml:"bootstrapMode"`
	// BootstrapHosts is a list of seed hosts to be used for ringpop bootstrap
	BootstrapHosts []string `yaml:"bootstrapHosts"`
	// BootstrapFile is the file path to be used for ringpop bootstrap
	BootstrapFile string `yaml:"bootstrapFile"`
	// MaxJoinDuration is the max wait time to join the ring
	MaxJoinDuration time.Duration `yaml:"maxJoinDuration"`
	// Custom discovery provider, cannot be specified through yaml
	DiscoveryProvider discovery.DiscoverProvider `yaml:"-"`
}

Ringpop contains the ringpop config items

func (*Ringpop) NewFactory

func (rpConfig *Ringpop) NewFactory(
	dispatcher *yarpc.Dispatcher,
	serviceName string,
	logger log.Logger,
) (*RingpopFactory, error)

NewFactory builds a ringpop factory conforming to the underlying configuration

type RingpopFactory

type RingpopFactory struct {
	sync.Mutex
	// contains filtered or unexported fields
}

RingpopFactory implements the RingpopFactory interface

func (*RingpopFactory) GetMembershipMonitor added in v0.11.0

func (factory *RingpopFactory) GetMembershipMonitor() (membership.Monitor, error)

GetMembershipMonitor return a membership monitor

type S3Archiver added in v0.12.0

type S3Archiver struct {
	Region           string  `yaml:"region"`
	Endpoint         *string `yaml:"endpoint"`
	S3ForcePathStyle bool    `yaml:"s3ForcePathStyle"`
}

S3Archiver contains the config for S3 archiver

type SQL added in v0.4.0

type SQL struct {
	// User is the username to be used for the conn
	User string `yaml:"user"`
	// Password is the password corresponding to the user name
	Password string `yaml:"password"`
	// PluginName is the name of SQL plugin
	PluginName string `yaml:"pluginName" validate:"nonzero"`
	// DatabaseName is the name of SQL database to connect to
	DatabaseName string `yaml:"databaseName" validate:"nonzero"`
	// ConnectAddr is the remote addr of the database
	ConnectAddr string `yaml:"connectAddr" validate:"nonzero"`
	// ConnectProtocol is the protocol that goes with the ConnectAddr ex - tcp, unix
	ConnectProtocol string `yaml:"connectProtocol" validate:"nonzero"`
	// ConnectAttributes is a set of key-value attributes to be sent as part of connect data_source_name url
	ConnectAttributes map[string]string `yaml:"connectAttributes"`
	// MaxConns the max number of connections to this datastore
	MaxConns int `yaml:"maxConns"`
	// MaxIdleConns is the max number of idle connections to this datastore
	MaxIdleConns int `yaml:"maxIdleConns"`
	// MaxConnLifetime is the maximum time a connection can be alive
	MaxConnLifetime time.Duration `yaml:"maxConnLifetime"`
	// NumShards is the number of storage shards to use for tables
	// in a sharded sql database. The default value for this param is 1
	NumShards int `yaml:"nShards"`
	// TLS is the configuration for TLS connections
	TLS *auth.TLS `yaml:"tls"`
	// EncodingType is the configuration for the type of encoding used for sql blobs
	EncodingType string `yaml:"encodingType"`
	// DecodingTypes is the configuration for all the sql blob decoding types which need to be supported
	// DecodingTypes should not be removed unless there are no blobs in database with the encoding type
	DecodingTypes []string `yaml:"decodingTypes"`
}

SQL is the configuration for connecting to a SQL backed datastore

type Service

type Service struct {
	// TChannel is the tchannel configuration
	RPC RPC `yaml:"rpc"`
	// Metrics is the metrics subsystem configuration
	Metrics Metrics `yaml:"metrics"`
	// PProf is the PProf configuration
	PProf PProf `yaml:"pprof"`
}

Service contains the service specific config items

type Statsd

type Statsd struct {
	// The host and port of the statsd server
	HostPort string `yaml:"hostPort" validate:"nonzero"`
	// The prefix to use in reporting to statsd
	Prefix string `yaml:"prefix" validate:"nonzero"`
	// FlushInterval is the maximum interval for sending packets.
	// If it is not specified, it defaults to 1 second.
	FlushInterval time.Duration `yaml:"flushInterval"`
	// FlushBytes specifies the maximum udp packet size you wish to send.
	// If FlushBytes is unspecified, it defaults  to 1432 bytes, which is
	// considered safe for local traffic.
	FlushBytes int `yaml:"flushBytes"`
}

Statsd contains the config items for statsd metrics reporter

type TopicConfig added in v0.18.0

type TopicConfig struct {
	Cluster string `yaml:"cluster"`
}

TopicConfig describes the mapping from topic to Kafka cluster

type TopicList added in v0.18.0

type TopicList struct {
	Topic    string `yaml:"topic"`
	DLQTopic string `yaml:"dlq-topic"`
}

TopicList describes the topic names for each cluster

type VisibilityArchival added in v0.7.0

type VisibilityArchival struct {
	// Status is the status of visibility archival either: enabled, disabled, or paused
	Status string `yaml:"status"`
	// EnableRead whether visibility can be read from archival
	EnableRead bool `yaml:"enableRead"`
	// Provider contains the config for all visibility archivers
	Provider *VisibilityArchiverProvider `yaml:"provider"`
}

VisibilityArchival contains the config for visibility archival

type VisibilityArchivalDomainDefaults added in v0.7.0

type VisibilityArchivalDomainDefaults struct {
	// Status is the domain default status of visibility archival: enabled or disabled
	Status string `yaml:"status"`
	// URI is the domain default URI for visibility archiver
	URI string `yaml:"URI"`
}

VisibilityArchivalDomainDefaults is the default visibility archival config for each domain

type VisibilityArchiverProvider added in v0.7.0

type VisibilityArchiverProvider struct {
	Filestore *FilestoreArchiver `yaml:"filestore"`
	S3store   *S3Archiver        `yaml:"s3store"`
	Gstorage  *GstorageArchiver  `yaml:"gstorage"`
}

VisibilityArchiverProvider contains the config for all visibility archivers

type VisibilityConfig added in v0.5.3

type VisibilityConfig struct {
	// EnableSampling for visibility
	EnableSampling dynamicconfig.BoolPropertyFn `yaml:"-" json:"-"`
	// EnableReadFromClosedExecutionV2 read closed from v2 table
	EnableReadFromClosedExecutionV2 dynamicconfig.BoolPropertyFn `yaml:"-" json:"-"`
	// VisibilityOpenMaxQPS max QPS for record open workflows
	VisibilityOpenMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter `yaml:"-" json:"-"`
	// VisibilityClosedMaxQPS max QPS for record closed workflows
	VisibilityClosedMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter `yaml:"-" json:"-"`
	// VisibilityListMaxQPS max QPS for list workflow
	VisibilityListMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter `yaml:"-" json:"-"`
	// ESIndexMaxResultWindow ElasticSearch index setting max_result_window
	ESIndexMaxResultWindow dynamicconfig.IntPropertyFn `yaml:"-" json:"-"`
	// MaxQPS is overall max QPS
	MaxQPS dynamicconfig.IntPropertyFn `yaml:"-" json:"-"`
	// ValidSearchAttributes is legal indexed keys that can be used in list APIs
	ValidSearchAttributes dynamicconfig.MapPropertyFn `yaml:"-" json:"-"`
}

VisibilityConfig is config for visibility

Jump to

Keyboard shortcuts

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