Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // The config file. ConfigFile string // is log level ("debug"|"info"|"warn"|"error"|"fatal") LogLevel string // is log enabled or not Debug bool // host to be attach. Host string // Cors configure CorsHeaders string `json:"api-cors-header,omitempty"` // cobra flags. Flags *pflag.FlagSet TLS bool TLSVerify bool CAFile string CertFile string KeyFile string ValuesSet map[string]interface{} }
func MergeDaemonConfigurations ¶
func MergeDaemonConfigurations(flagsConfig *Config, flags *pflag.FlagSet, configFile string) (*Config, error)
MergeDaemonConfigurations reads a configuration file, loads the file configuration in an isolated structure, and merges the configuration provided from flags on top if there are no conflicts.
func NewDaemonConfig ¶
func NewDaemonConfig() *Config
type NamedOption ¶
type NamedOption interface {
Name() string
}
NamedOption is an interface that list and map options with names implement.
Click to show internal directories.
Click to hide internal directories.