config

package
v0.9.32 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(cfg PadderConfig) error

Types

type Config

type Config struct {
	*flag.FlagSet `json:"-"`
	Log           logutil.LogConfig `toml:"log" json:"log"`
	ConfigFile    string            `toml:"-" json:"-"`
	PadderConfig  PadderConfig      `toml:"padder" json:"padder"`
	Version       bool
	PreviewMode   bool
}

func CreateConfigFromString

func CreateConfigFromString(configString string) (*Config, error)

func NewConfig

func NewConfig() *Config

func (*Config) CreateConfigFromFile

func (c *Config) CreateConfigFromFile(path string) error

func (*Config) ParseCmd

func (cfg *Config) ParseCmd(arguments []string) error

type MySQLConfig

type MySQLConfig struct {
	Target        *utils.DBConfig            `toml:"target" json:"target"`
	StartPosition *utils.MySQLBinlogPosition `toml:"start-position" json:"start-position"`
}

type PadderConfig

type PadderConfig struct {
	BinLogList   []string     `toml:"binlog-list" json:"binlog-list"`
	MySQLConfig  *MySQLConfig `toml:"mysql" json:"mysql"`
	EnableDelete bool         `toml:"enable-delete" json:"enable-delete"`
}

Jump to

Keyboard shortcuts

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