config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Type   string                 `toml:"type"`
	Config map[string]interface{} `toml:"config"`
}

type Input

type Input struct {
	StartPosition    time.Time `toml:"start-position"`
	ConvertSnakeCase bool      `toml:"convert-snake-case"`
}

type Mongo

type Mongo struct {
	Uri      string
	UserName string
	Password string
}

type MongoSrConfig

type MongoSrConfig struct {
	Name       string
	Input      *Input
	Mongo      *Mongo
	Starrocks  *Starrocks
	Filter     []*Filter
	Rules      []*rule.MongoToSrRule `toml:"rule"`
	Logger     *log.Logger
	ConfigFile string
	OutputType string
	SyncParam  *SyncParam `toml:"sync-param"`
}

func NewMongoSrConfig

func NewMongoSrConfig(configFile *string) *MongoSrConfig

func (*MongoSrConfig) ReadMongoSrConf

func (config *MongoSrConfig) ReadMongoSrConf(filename string) (*MongoSrConfig, error)

type Mysql

type Mysql struct {
	Host     string
	Port     int
	UserName string
	Password string
}

type MysqlInput

type MysqlInput struct {
	StartPosition string `toml:"start-gtid"`
}

type MysqlSrConfig

type MysqlSrConfig struct {
	Name       string
	Input      *MysqlInput
	Mysql      *Mysql
	Starrocks  *Starrocks
	Filter     []*Filter
	Rules      []*rule.MysqlToSrRule `toml:"rule"`
	Logger     *log.Logger
	ConfigFile string
	SyncParam  *SyncParam `toml:"sync-param"`
}

func NewMysqlSrConfig

func NewMysqlSrConfig(configFile *string) *MysqlSrConfig

func (*MysqlSrConfig) ReadMysqlSrConf

func (config *MysqlSrConfig) ReadMysqlSrConf(filename string) (*MysqlSrConfig, error)

type Starrocks

type Starrocks struct {
	Host     string
	Port     int
	UserName string
	Password string
}

type SyncParam

type SyncParam struct {
	ChannelSize      int `toml:"channel-size"`
	FlushDelaySecond int `toml:"flush-delay-second"`
}

Jump to

Keyboard shortcuts

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