Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCluster ¶ added in v1.3.5
func DefaultCluster() string
DefaultCluster returns the trimmed default cluster name from the loaded config.
Types ¶
type AutoRepairConfig ¶
type CertAuthConfig ¶
type Config ¶
type Config struct {
DefaultCluster string `yaml:"default_cluster"`
Postgres PostgresConfig `yaml:"postgres"`
TableDiff DiffConfig `yaml:"table_diff"`
MTree MTreeConfig `yaml:"mtree"`
Server ServerConfig `yaml:"server"`
ScheduleJobs []JobDef `yaml:"schedule_jobs"`
ScheduleConfig []SchedDef `yaml:"schedule_config"`
AutoRepair AutoRepairConfig `yaml:"auto_repair_config"`
CertAuth CertAuthConfig `yaml:"cert_auth"`
DebugMode bool `yaml:"debug_mode"`
}
var Cfg *Config
Cfg holds the loaded config for the whole app.
type DiffConfig ¶
type DiffConfig struct {
ConcurrencyFactor int `yaml:"concurrency_factor"`
MaxDiffRows int64 `yaml:"max_diff_rows"`
MinBlockSize int `yaml:"min_diff_block_size"`
MaxBlockSize int `yaml:"max_diff_block_size"`
DiffBlockSize int `yaml:"diff_block_size"`
MaxCPURatio float64 `yaml:"max_cpu_ratio"`
BatchSize int `yaml:"diff_batch_size"`
MaxBatchSize int `yaml:"max_diff_batch_size"`
CompareUnitSize int `yaml:"compare_unit_size"`
}
type JobDef ¶
type JobDef struct {
Name string `yaml:"name"`
Type string `yaml:"type,omitempty"`
ClusterName string `yaml:"cluster_name,omitempty"`
TableName string `yaml:"table_name,omitempty"`
SchemaName string `yaml:"schema_name,omitempty"`
RepsetName string `yaml:"repset_name,omitempty"`
Args map[string]any `yaml:"args,omitempty"`
}
type MTreeConfig ¶
type MTreeConfig struct {
CDC struct {
SlotName string `yaml:"slot_name"`
PublicationName string `yaml:"publication_name"`
CDCProcessingTimeout int `yaml:"cdc_processing_timeout"`
CDCMetadataFlushSec int `yaml:"cdc_metadata_flush_seconds"`
} `yaml:"cdc"`
Schema string `yaml:"schema"`
Diff struct {
MinBlockSize int `yaml:"min_block_size"`
BlockSize int `yaml:"block_size"`
MaxBlockSize int `yaml:"max_block_size"`
} `yaml:"diff"`
}
type PostgresConfig ¶
type PostgresConfig struct {
StatementTimeout int `yaml:"statement_timeout"` // ms
ConnectionTimeout int `yaml:"connection_timeout"` // s
ApplicationName string `yaml:"application_name"`
TCPKeepalivesIdle *int `yaml:"tcp_keepalives_idle"` // s
TCPKeepalivesInterval *int `yaml:"tcp_keepalives_interval"` // s
TCPKeepalivesCount *int `yaml:"tcp_keepalives_count"`
}
type ServerConfig ¶
type ServerConfig struct {
ListenAddress string `yaml:"listen_address"`
ListenPort int `yaml:"listen_port"`
TLSCertFile string `yaml:"tls_cert_file"`
TLSKeyFile string `yaml:"tls_key_file"`
ClientCRLFile string `yaml:"client_crl_file"`
AllowedCNs []string `yaml:"allowed_common_names"`
TaskStorePath string `yaml:"taskstore_path"`
}
Click to show internal directories.
Click to hide internal directories.