Documentation ¶
Index ¶
- func AdjustByteSize(v *typeutil.ByteSize, defValue typeutil.ByteSize)
- func AdjustCommandlineBool(flagSet *pflag.FlagSet, v *bool, name string)
- func AdjustCommandlineString(flagSet *pflag.FlagSet, v *string, name string)
- func AdjustDuration(v *typeutil.Duration, defValue time.Duration)
- func AdjustFloat64(v *float64, defValue float64)
- func AdjustInt(v *int, defValue int)
- func AdjustInt64(v *int64, defValue int64)
- func AdjustPath(p *string)
- func AdjustString(v *string, defValue string)
- func AdjustUint64(v *uint64, defValue uint64)
- func ConfigFromFile(c interface{}, path string) (*toml.MetaData, error)
- func PrintConfigCheckMsg(w io.Writer, warningMsgs []string)
- type ConfigMetaData
- type SecurityConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustByteSize ¶
AdjustByteSize adjusts the value of a ByteSize variable.
func AdjustCommandlineBool ¶
AdjustCommandlineBool adjusts the value of a bool variable from command line flags.
func AdjustCommandlineString ¶
AdjustCommandlineString adjusts the value of a string variable from command line flags.
func AdjustDuration ¶
AdjustDuration adjusts the value of a Duration variable.
func AdjustFloat64 ¶
AdjustFloat64 adjusts the value of a float64 variable.
func AdjustInt64 ¶
AdjustInt64 adjusts the value of a int64 variable.
func AdjustString ¶
AdjustString adjusts the value of a string variable.
func AdjustUint64 ¶
AdjustUint64 adjusts the value of a uint64 variable.
func ConfigFromFile ¶
ConfigFromFile loads config from file.
func PrintConfigCheckMsg ¶
PrintConfigCheckMsg prints the message about configuration checks.
Types ¶
type ConfigMetaData ¶
type ConfigMetaData struct {
// contains filtered or unexported fields
}
ConfigMetaData is an utility to test if a configuration is defined.
func NewConfigMetadata ¶
func NewConfigMetadata(meta *toml.MetaData) *ConfigMetaData
NewConfigMetadata is the a factory method to create a ConfigMetaData object
func (*ConfigMetaData) CheckUndecoded ¶
func (m *ConfigMetaData) CheckUndecoded() error
CheckUndecoded checks if the configuration contains undefined items
func (*ConfigMetaData) Child ¶
func (m *ConfigMetaData) Child(path ...string) *ConfigMetaData
Child gets the config metadata of the given path
func (*ConfigMetaData) IsDefined ¶
func (m *ConfigMetaData) IsDefined(key string) bool
IsDefined checks if the given key is defined in the configuration
type SecurityConfig ¶
type SecurityConfig struct { grpcutil.TLSConfig // RedactInfoLog indicates that whether enabling redact log RedactInfoLog bool `toml:"redact-info-log" json:"redact-info-log"` Encryption encryption.Config `toml:"encryption" json:"encryption"` }
SecurityConfig indicates the security configuration