Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogger ¶
CreateLogger returns a configured logger.
Types ¶
type Config ¶
type Config struct { Etcd struct { Endpoints []string `config:"etcd-endpoints"` Namespace string `config:"etcd-namespace"` } Server struct { Address string `config:"addr"` Timeout time.Duration `config:"server-timeout"` WatchTimeout time.Duration `config:"server-watch-timeout"` } LogLevel string `config:"log-level"` }
Config holds the server configuration.
func LoadConfig ¶
LoadConfig loads the configuration from the environment or command line flags. The args hold the command line arguments, as found in os.Argv. It returns flag.ErrHelp if the -help flag is specified on the command line.
Click to show internal directories.
Click to hide internal directories.