Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Exchanger *Exchanger `yaml:"exchanger"`
Storage *Storage `yaml:"storage"`
Server *Server `yaml:"server"`
}
Config the envcd config
func NewConfig ¶
NewConfig new envcd config
@param configFile the config file @return *Config current config instance
func (*Config) StartInformation ¶
func (cfg *Config) StartInformation()
StartInformation the envcd config information
@receiver cfg
type ConnMetadata ¶
type ConnMetadata struct {
Type string // url schema
UserName string
Password string
Host string
Hostname string
Port int
}
ConnMetadata with standard Url: etcd://user:123@localhost:123 metadata
type Exchanger ¶
type Exchanger struct {
// Exchanger with standard Url: etcd://user:123@localhost:123
// the schema is the kind of the center
Url string `yaml:"url"`
ConnMetadata *ConnMetadata
}
Exchanger the Exchanger config
type Server ¶
type Server struct {
RunMode string `yaml:"run-mode"`
Port int `yaml:"port"`
ReadTimeout int `yaml:"read-timeout"`
WriteTimeout int `yaml:"write-timeout"`
}
Server the Server config
type Storage ¶
type Storage struct {
// Url with standard Url: MySQL://user:123@localhost:123
Url string `yaml:"url"`
Database string `yaml:"database"`
ConnMetadata *ConnMetadata
}
Storage the Storage config
Click to show internal directories.
Click to hide internal directories.