cfg

package
v0.0.0-...-b4c1251 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildTableConfig

type ChildTableConfig struct {
	AssociatedKey string `yaml:"associated_key"`
	TableName     string `yaml:"table_name"`
}

type Config

type Config struct {
	Addr       string       `yaml:"addr"`
	LogLevel   string       `yaml:"log_level"`
	SchemaPath []string     `yaml:"schema_path"`
	LogPath    string       `yaml:"log_path"`
	UserList   []UserConfig `yaml:"user_list"`
	SchemaList []SchemaConfig
}

func ParseConfig

func ParseConfig(path string) (*Config, error)

type NodeConfig

type NodeConfig struct {
	Name             string `yaml:"name"`
	DownAfterNoAlive int    `yaml:"down_after_noalive"`
	MaxConnsLimit    int    `yaml:"max_conns_limit"`

	User     string `yaml:"user"`
	Password string `yaml:"password"`

	Master    string   `yaml:"master"`
	SlaveList []string `yaml:"slave_list"`
}

type RuleConfig

type RuleConfig struct {
	TableName      string             `yaml:"table_name"`
	Key            string             `yaml:"key"`
	Type           string             `yaml:"type"`
	Location       []int              `yaml:"location"`
	ChildTableList []ChildTableConfig `yaml:"child_table_list"`
}

type SchemaConfig

type SchemaConfig struct {
	//UserList []UserConfig `yaml:"user_list"`
	NodeList   []NodeConfig `yaml:"node_list"`
	SchemaName string       `yaml:"schema_name"`
	//NodeList []NodeConfig `yaml:"node_list"`
	DefaultNode string `yaml:"default_node"`

	RuleList []RuleConfig `yaml:"rule_list"`
}

type UserConfig

type UserConfig struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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