config

package
v0.0.0-...-8ffd201 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(fileName string) error

func NewEtcd

func NewEtcd() clientv3.Config

func WildcardMatch

func WildcardMatch(s, p string) bool

Types

type Config

type Config struct {
	Etcd            Etcd            `yaml:"etcd"`
	Runtime         *Runtime        `yaml:"runtime"`
	FileConnectors  FileConnectors  `yaml:"file-connector"`
	HttpConnectors  HttpConnectors  `yaml:"http-connector"`
	MysqlConnectors MysqlConnectors `yaml:"mysql-connector"`
	Worker          Worker          `yaml:"worker"`
	Coordinator     Coordinator     `yaml:"coordinator"`
}
var Conf Config

type Coordinator

type Coordinator struct {
	HttpPort int `yaml:"http-port"`
}

type Etcd

type Etcd struct {
	Endpoint             []string `yaml:"endpoint"`
	DialTimeout          int      `yaml:"dial-timeout"`
	DialKeepAliveTimeout int      `yaml:"dial-keepalive-timeout"`
	Username             string   `yaml:"username"`
	Password             string   `yaml:"password"`
}

type FileConnector

type FileConnector struct {
	Catalog     string   `yaml:"catalog"`
	Schema      string   `yaml:"schema"`
	Table       string   `yaml:"table"`
	FileType    string   `yaml:"file-type"`
	ColumnNames []string `yaml:"column-names"`
	ColumnTypes []string `yaml:"column-types"`
	Paths       []string `yaml:"paths"`
}

type FileConnectors

type FileConnectors map[string]*FileConnector

func (FileConnectors) Check

func (c FileConnectors) Check() error

func (FileConnectors) GetConfig

func (c FileConnectors) GetConfig(name string) *FileConnector

type HttpConnector

type HttpConnector struct {
	Catalog      string   `yaml:"catalog"`
	Schema       string   `yaml:"schema"`
	Table        string   `yaml:"table"`
	DataPath     string   `yaml:"data-path"`
	FilterColumn string   `yaml:"filter-column"`
	ResultColumn string   `yaml:"result-column"`
	ColumnNames  []string `yaml:"column-names"`
	ColumnTypes  []string `yaml:"column-types"`
}

type HttpConnectors

type HttpConnectors map[string]*HttpConnector

func (HttpConnectors) Check

func (c HttpConnectors) Check() error

func (HttpConnectors) GetConfig

func (c HttpConnectors) GetConfig(name string) *HttpConnector

type MysqlConnector

type MysqlConnector struct {
	Catalog     string   `yaml:"catalog"`
	Schema      string   `yaml:"schema"`
	Table       string   `yaml:"table"`
	Host        string   `yaml:"host"`
	Port        string   `yaml:"port"`
	User        string   `yaml:"user"`
	Password    string   `yaml:"password"`
	ColumnNames []string `yaml:"column-names"`
	ColumnTypes []string `yaml:"column-types"`
}

type MysqlConnectors

type MysqlConnectors map[string]*MysqlConnector

func (MysqlConnectors) Check

func (m MysqlConnectors) Check() error

func (MysqlConnectors) GetConfig

func (m MysqlConnectors) GetConfig(name string) *MysqlConnector

type Runtime

type Runtime struct {
	Catalog        string `yaml:"catalog"`
	Schema         string `yaml:"schema"`
	Table          string `yaml:"table"`
	ParallelNumber int    `yaml:"parallel-number"`
}

func NewRuntime

func NewRuntime() *Runtime

type Worker

type Worker struct {
	Host    string `yaml:"host"`
	TCPPort int    `yaml:"tcp-port"`
	RPCPort int    `yaml:"rpc-port"`
}

Jump to

Keyboard shortcuts

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