conf

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf conf
	Conf = &Config{}
)

Functions

func ConfigWalther added in v0.1.2

func ConfigWalther(fp string)

ConfigWalther watch configuration file change or not

func Init

func Init() (err error)

Init init conf

Types

type Config

type Config struct {
	Nodes      []string
	Zones      map[string][]string
	HTTPServer *ServerConfig
	HTTPClient *http.ClientConfig
	Env        *Env
	// Scheduler  []byte
	Schedulers map[string]*model.Scheduler
}

Config config.

func LoadConfig added in v0.1.2

func LoadConfig(fh string) (*Config, error)

LoadConfig load config from file toml

func (*Config) Fix

func (c *Config) Fix() (err error)

Fix fix env config.

type DiscoveryConfig added in v0.1.2

type DiscoveryConfig = Config

type Env

type Env struct {
	Region    string
	Zone      string
	Host      string
	DeployEnv string
}

Env is disocvery env.

type ServerConfig

type ServerConfig struct {
	Addr string
}

ServerConfig Http Servers conf.

Jump to

Keyboard shortcuts

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