Documentation
¶
Index ¶
Constants ¶
View Source
const Name = "mongo-batch"
Variables ¶
This section is empty.
Functions ¶
func SetupInitialPosition ¶
func SetupInitialPosition(cache position_cache.PositionCacheInterface, session *mgo.Session, router core.Router, cfg Config) error
Types ¶
type Config ¶
type Config struct {
Source *config.MongoConnConfig `mapstructure:"source" toml:"source" json:"source"`
PositionRepo *config.GenericPluginConfig `mapstructure:"position-repo" toml:"position-repo" json:"position-repo"`
BatchSize int `mapstructure:"batch-size" toml:"batch-size" json:"batch-size"`
WorkerCnt int `mapstructure:"worker-cnt" toml:"worker-cnt" json:"worker-cnt"`
ChunkThreshold int `mapstructure:"chunk-threshold" toml:"chunk-threshold" json:"chunk-threshold"`
// IgnoreOplogError ignores error with oplog.
// Some mongo cluster setup may not support oplog.
IgnoreOplogError bool `mapstructure: "ignore-oplog-error" toml:"ignore-oplog-error" json:"ignore-oplog-error"`
}
type PositionValue ¶
type PositionValue struct {
Start bson.MongoTimestamp `bson:"start" json:"start"`
Chunks []chunk `bson:"chunks" json:"chunks"`
}
Click to show internal directories.
Click to hide internal directories.