config

package
v0.0.0-...-334364b Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2016 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// TTL to use with all state pushed to Registry
	DefaultTTL = "10s"
	// If an environment variable with the EnvPrefix is set, it will take precedence over values
	// in the configuration file. Command line flags will override the environment variables.
	EnvConfigPrefix = "TIADM_"
	// First try to load configuration file in $(PWD), if not exist then check /etc/tiadm/tiadm.conf
	DefaultConfigFile = "tiadm.conf"
	DefaultConfigDir  = "/etc/tiadm"
	DefaultKeyPrefix  = "/_pingcap.com/tiadmin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EtcdServers        []string
	EtcdKeyPrefix      string
	EtcdRequestTimeout int
	MonitorInterval    int
	HostIP             string
	HostName           string
	HostRegion         string
	HostIDC            string
	AgentTTL           string
	TokenLimit         int
	IsMock             bool
	APIPort            int
}

func ParseFlag

func ParseFlag() (*Config, error)

Jump to

Keyboard shortcuts

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