Documentation
¶
Index ¶
Constants ¶
View Source
const CheckpointTypeAuto = "auto"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckpointConfig ¶
type CheckpointConfig struct {
Type string `json:"type" yaml:"type"`
TokenSaveTimeout time.Duration `json:"saveTimeout" yaml:"saveTimeout"`
TokenSaveInterval time.Duration `json:"tokenSaveInterval" yaml:"tokenSaveInterval"`
ChangeStreamSaveCount int `json:"changeStreamSaveCount" yaml:"changeStreamSaveCount"`
BootstrapSaveCount int `json:"bootstrapSaveCount" yaml:"bootstrapSaveCount"`
BootstrapSaveInterval time.Duration `json:"bootstrapSaveInterval" yaml:"bootstrapSaveInterval"`
BootstrapQueryBatchSize int32 `json:"bootstrapQueryBatchSize" yaml:"bootstrapQueryBatchSize"`
IdleHeartbeatInterval time.Duration `json:"idleHeartbeatInterval" yaml:"idleHeartbeatInterval"`
MaxIdleTime time.Duration `json:"maxIdleTime" yaml:"maxIdleTime"`
}
type Config ¶
type Config struct {
Partition PartitionConfig `json:"partition" yaml:"partition"`
Logger LoggerConfig `json:"logger" yaml:"logger"`
MongoDB MongoDB `json:"mongodb" yaml:"mongodb"`
Checkpoint CheckpointConfig `json:"checkpoint" yaml:"checkpoint"`
Metric MetricConfig `json:"metric" yaml:"metric"`
GracefulShutdownTimeout time.Duration `json:"gracefulShutdownTimeout" yaml:"gracefulShutdownTimeout"`
}
func ReadConfigJSON ¶
func ReadConfigYAML ¶
func (*Config) SetDefault ¶
func (c *Config) SetDefault()
type Connection ¶
type Connection struct {
URI string `json:"uri" yaml:"uri"`
Username string `json:"username" yaml:"username"`
Password string `json:"password" yaml:"password"`
Database string `json:"database" yaml:"database"`
Collection string `json:"collection" yaml:"collection"`
}
func (*Connection) Validate ¶
func (c *Connection) Validate() error
type ConnectionPool ¶
type ConnectionPool struct {
MaxPoolSize uint64 `json:"maxPoolSize" yaml:"maxPoolSize"`
MinPoolSize uint64 `json:"minPoolSize" yaml:"minPoolSize"`
MaxIdleTimeMS int64 `json:"maxIdleTimeMS" yaml:"maxIdleTimeMS"`
}
func (*ConnectionPool) Validate ¶
func (cp *ConnectionPool) Validate() error
type LoggerConfig ¶
type LoggerConfig struct {
LogLevel string `json:"logLevel" yaml:"logLevel"`
}
type MetricConfig ¶
type MetricConfig struct {
Port int `json:"port" yaml:"port"`
}
type MongoDB ¶
type MongoDB struct {
Connection Connection `json:"connection" yaml:"connection"`
Timeouts Timeouts `json:"timeouts" yaml:"timeouts"`
ConnectionPool ConnectionPool `json:"connectionPool" yaml:"connectionPool"`
}
type PartitionConfig ¶
type PartitionConfig struct {
WorkersCollection string `json:"workersCollection" yaml:"workersCollection"`
PartitionsCollection string `json:"partitionsCollection" yaml:"partitionsCollection"`
ConsumerGroup string `json:"consumerGroup" yaml:"consumerGroup"`
HeartbeatInterval time.Duration `json:"heartbeatInterval" yaml:"heartbeatInterval"`
WorkerTimeout time.Duration `json:"workerTimeout" yaml:"workerTimeout"`
RebalanceCheckInterval time.Duration `json:"rebalanceCheckInterval" yaml:"rebalanceCheckInterval"`
TotalPartition int `json:"totalPartition" yaml:"totalPartition"`
}
func (*PartitionConfig) Validate ¶
func (p *PartitionConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.