Documentation ¶
Index ¶
- func GetBool(v interface{}) (bool, error)
- func GetInt(v interface{}) (int, error)
- func GetRuntimeSetting(setting string) (interface{}, error)
- func RegisterRuntimeSetting(setting RuntimeSetting) error
- func RuntimeSettings() map[string]RuntimeSetting
- func SetRuntimeSetting(setting string, value interface{}) error
- type Client
- type ClientBuilder
- type LogLevelRuntimeSetting
- type LogPayloadsRuntimeSetting
- type ProfilingGoroutines
- type ProfilingRuntimeSetting
- type RuntimeBlockProfileRate
- type RuntimeMutexProfileFraction
- type RuntimeSetting
- type RuntimeSettingResponse
- type SettingNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBool ¶
GetBool returns the bool value contained in value. If value is a bool, returns its value If value is a string, it converts "true" to true and "false" to false. Else, returns an error.
func GetInt ¶
GetInt returns the integer value contained in value. If value is a integer, returns its value If value is a string, it parses the string into an integer. Else, returns an error.
func GetRuntimeSetting ¶
GetRuntimeSetting returns the value of a runtime configurable setting
func RegisterRuntimeSetting ¶
func RegisterRuntimeSetting(setting RuntimeSetting) error
RegisterRuntimeSetting keeps track of configurable settings
func RuntimeSettings ¶
func RuntimeSettings() map[string]RuntimeSetting
RuntimeSettings returns all runtime configurable settings
func SetRuntimeSetting ¶
SetRuntimeSetting changes the value of a runtime configurable setting
Types ¶
type Client ¶
type Client interface { Get(key string) (interface{}, error) Set(key string, value string) (bool, error) List() (map[string]RuntimeSettingResponse, error) FullConfig() (string, error) }
Client is the interface for interacting with the runtime settings API
type ClientBuilder ¶
ClientBuilder represents a function returning a runtime settings API client
type LogLevelRuntimeSetting ¶
type LogLevelRuntimeSetting struct {
ConfigKey string
}
LogLevelRuntimeSetting wraps operations to change log level at runtime.
func (LogLevelRuntimeSetting) Description ¶
func (l LogLevelRuntimeSetting) Description() string
Description returns the runtime setting's description
func (LogLevelRuntimeSetting) Get ¶
func (l LogLevelRuntimeSetting) Get() (interface{}, error)
Get returns the current value of the runtime setting
func (LogLevelRuntimeSetting) Hidden ¶
func (l LogLevelRuntimeSetting) Hidden() bool
Hidden returns whether or not this setting is hidden from the list of runtime settings
func (LogLevelRuntimeSetting) Name ¶
func (l LogLevelRuntimeSetting) Name() string
Name returns the name of the runtime setting
func (LogLevelRuntimeSetting) Set ¶
func (l LogLevelRuntimeSetting) Set(v interface{}) error
Set changes the value of the runtime setting
type LogPayloadsRuntimeSetting ¶
type LogPayloadsRuntimeSetting struct { }
LogPayloadsRuntimeSetting wraps operations to start logging aggregator payload at runtime.
func (LogPayloadsRuntimeSetting) Description ¶
func (l LogPayloadsRuntimeSetting) Description() string
Description returns the runtime setting's description
func (LogPayloadsRuntimeSetting) Get ¶
func (l LogPayloadsRuntimeSetting) Get() (interface{}, error)
Get returns the current value of the runtime setting
func (LogPayloadsRuntimeSetting) Hidden ¶
func (l LogPayloadsRuntimeSetting) Hidden() bool
Hidden returns whether or not this setting is hidden from the list of runtime settings
func (LogPayloadsRuntimeSetting) Name ¶
func (l LogPayloadsRuntimeSetting) Name() string
Name returns the name of the runtime setting
func (LogPayloadsRuntimeSetting) Set ¶
func (l LogPayloadsRuntimeSetting) Set(v interface{}) error
Set changes the value of the runtime setting
type ProfilingGoroutines ¶
type ProfilingGoroutines (string)
ProfilingGoroutines wraps runtime.SetBlockProfileRate setting
func (ProfilingGoroutines) Description ¶
func (r ProfilingGoroutines) Description() string
Description returns the runtime setting's description
func (ProfilingGoroutines) Get ¶
func (r ProfilingGoroutines) Get() (interface{}, error)
Get returns the current value of the runtime setting
func (ProfilingGoroutines) Hidden ¶
func (r ProfilingGoroutines) Hidden() bool
Hidden returns whether or not this setting is hidden from the list of runtime settings
func (ProfilingGoroutines) Name ¶
func (r ProfilingGoroutines) Name() string
Name returns the name of the runtime setting
func (ProfilingGoroutines) Set ¶
func (r ProfilingGoroutines) Set(value interface{}) error
Set changes the value of the runtime setting
type ProfilingRuntimeSetting ¶
type ProfilingRuntimeSetting string
ProfilingRuntimeSetting wraps operations to change log level at runtime
func (ProfilingRuntimeSetting) Description ¶
func (l ProfilingRuntimeSetting) Description() string
Description returns the runtime setting's description
func (ProfilingRuntimeSetting) Get ¶
func (l ProfilingRuntimeSetting) Get() (interface{}, error)
Get returns the current value of the runtime setting
func (ProfilingRuntimeSetting) Hidden ¶
func (l ProfilingRuntimeSetting) Hidden() bool
Hidden returns whether or not this setting is hidden from the list of runtime settings
func (ProfilingRuntimeSetting) Name ¶
func (l ProfilingRuntimeSetting) Name() string
Name returns the name of the runtime setting
func (ProfilingRuntimeSetting) Set ¶
func (l ProfilingRuntimeSetting) Set(v interface{}) error
Set changes the value of the runtime setting
type RuntimeBlockProfileRate ¶
type RuntimeBlockProfileRate (string)
RuntimeBlockProfileRate wraps runtime.SetBlockProfileRate setting
func (RuntimeBlockProfileRate) Description ¶
func (r RuntimeBlockProfileRate) Description() string
Description returns the runtime setting's description
func (RuntimeBlockProfileRate) Get ¶
func (r RuntimeBlockProfileRate) Get() (interface{}, error)
Get returns the current value of the runtime setting
func (RuntimeBlockProfileRate) Hidden ¶
func (r RuntimeBlockProfileRate) Hidden() bool
Hidden returns whether or not this setting is hidden from the list of runtime settings
func (RuntimeBlockProfileRate) Name ¶
func (r RuntimeBlockProfileRate) Name() string
Name returns the name of the runtime setting
func (RuntimeBlockProfileRate) Set ¶
func (r RuntimeBlockProfileRate) Set(value interface{}) error
Set changes the value of the runtime setting
type RuntimeMutexProfileFraction ¶
type RuntimeMutexProfileFraction (string)
RuntimeMutexProfileFraction wraps runtime.SetMutexProfileFraction setting.
func (RuntimeMutexProfileFraction) Description ¶
func (r RuntimeMutexProfileFraction) Description() string
Description returns the runtime setting's description
func (RuntimeMutexProfileFraction) Get ¶
func (r RuntimeMutexProfileFraction) Get() (interface{}, error)
Get returns the current value of the runtime setting
func (RuntimeMutexProfileFraction) Hidden ¶
func (r RuntimeMutexProfileFraction) Hidden() bool
Hidden returns whether or not this setting is hidden from the list of runtime settings
func (RuntimeMutexProfileFraction) Name ¶
func (r RuntimeMutexProfileFraction) Name() string
Name returns the name of the runtime setting
func (RuntimeMutexProfileFraction) Set ¶
func (r RuntimeMutexProfileFraction) Set(value interface{}) error
Set changes the value of the runtime setting
type RuntimeSetting ¶
type RuntimeSetting interface { Get() (interface{}, error) Set(v interface{}) error Name() string Description() string Hidden() bool }
RuntimeSetting represents a setting that can be changed and read at runtime.
type RuntimeSettingResponse ¶
RuntimeSettingResponse is used to communicate settings config
type SettingNotFoundError ¶
type SettingNotFoundError struct {
// contains filtered or unexported fields
}
SettingNotFoundError is used to warn about non existing/not registered runtime setting
func (*SettingNotFoundError) Error ¶
func (e *SettingNotFoundError) Error() string