Documentation ¶
Overview ¶
Package settings implements runtime settings and profiling
Index ¶
- Constants
- func ExecWithRuntimeProfilingSettings(callback func(), opts ProfilingOpts, settingsClient Client) error
- func GetBool(v interface{}) (bool, error)
- func GetInt(v interface{}) (int, error)
- type ActivityDumpRuntimeSetting
- func (l *ActivityDumpRuntimeSetting) Description() string
- func (l *ActivityDumpRuntimeSetting) Get(config config.Component) (interface{}, error)
- func (l *ActivityDumpRuntimeSetting) Hidden() bool
- func (l *ActivityDumpRuntimeSetting) Name() string
- func (l *ActivityDumpRuntimeSetting) Set(config config.Component, v interface{}, source model.Source) error
- type Client
- type ClientBuilder
- type LogLevelRuntimeSetting
- func (l *LogLevelRuntimeSetting) Description() string
- func (l *LogLevelRuntimeSetting) Get(_ config.Component) (interface{}, error)
- func (l *LogLevelRuntimeSetting) Hidden() bool
- func (l *LogLevelRuntimeSetting) Name() string
- func (l *LogLevelRuntimeSetting) Set(config config.Component, v interface{}, source model.Source) error
- type LogPayloadsRuntimeSetting
- func (l *LogPayloadsRuntimeSetting) Description() string
- func (l *LogPayloadsRuntimeSetting) Get(config config.Component) (interface{}, error)
- func (l *LogPayloadsRuntimeSetting) Hidden() bool
- func (l *LogPayloadsRuntimeSetting) Name() string
- func (l *LogPayloadsRuntimeSetting) Set(config config.Component, v interface{}, source model.Source) error
- type ProfilingGoroutines
- func (r *ProfilingGoroutines) Description() string
- func (r *ProfilingGoroutines) Get(config config.Component) (interface{}, error)
- func (r *ProfilingGoroutines) Hidden() bool
- func (r *ProfilingGoroutines) Name() string
- func (r *ProfilingGoroutines) Set(config config.Component, value interface{}, source model.Source) error
- type ProfilingOpts
- type ProfilingRuntimeSetting
- func (l *ProfilingRuntimeSetting) Description() string
- func (l *ProfilingRuntimeSetting) Get(config config.Component) (interface{}, error)
- func (l *ProfilingRuntimeSetting) Hidden() bool
- func (l *ProfilingRuntimeSetting) Name() string
- func (l *ProfilingRuntimeSetting) Set(config config.Component, v interface{}, source model.Source) error
- type RuntimeBlockProfileRate
- func (r *RuntimeBlockProfileRate) Description() string
- func (r *RuntimeBlockProfileRate) Get(_ config.Component) (interface{}, error)
- func (r *RuntimeBlockProfileRate) Hidden() bool
- func (r *RuntimeBlockProfileRate) Name() string
- func (r *RuntimeBlockProfileRate) Set(config config.Component, value interface{}, source model.Source) error
- type RuntimeMutexProfileFraction
- func (r *RuntimeMutexProfileFraction) Description() string
- func (r *RuntimeMutexProfileFraction) Get(_ config.Component) (interface{}, error)
- func (r *RuntimeMutexProfileFraction) Hidden() bool
- func (r *RuntimeMutexProfileFraction) Name() string
- func (r *RuntimeMutexProfileFraction) Set(config config.Component, value interface{}, source model.Source) error
Constants ¶
const (
// MaxDumpSizeConfKey defines the full config key for rate_limiter
MaxDumpSizeConfKey = "runtime_security_config.activity_dump.max_dump_size"
)
Variables ¶
This section is empty.
Functions ¶
func ExecWithRuntimeProfilingSettings ¶
func ExecWithRuntimeProfilingSettings(callback func(), opts ProfilingOpts, settingsClient Client) error
ExecWithRuntimeProfilingSettings runs the callback func with the given runtime profiling settings
Types ¶
type ActivityDumpRuntimeSetting ¶
type ActivityDumpRuntimeSetting struct {
ConfigKey string
}
ActivityDumpRuntimeSetting wraps operations to change activity dumps settings at runtime
func (*ActivityDumpRuntimeSetting) Description ¶
func (l *ActivityDumpRuntimeSetting) Description() string
Description returns the runtime setting's description
func (*ActivityDumpRuntimeSetting) Get ¶
func (l *ActivityDumpRuntimeSetting) Get(config config.Component) (interface{}, error)
Get returns the current value of the runtime setting
func (*ActivityDumpRuntimeSetting) Hidden ¶
func (l *ActivityDumpRuntimeSetting) Hidden() bool
Hidden returns whether or not this setting is hidden from the list of runtime settings
func (*ActivityDumpRuntimeSetting) Name ¶
func (l *ActivityDumpRuntimeSetting) Name() string
Name returns the name of the runtime setting
type Client ¶
type Client interface { Get(key string) (interface{}, error) GetWithSources(key string) (map[string]interface{}, error) Set(key string, value string) (bool, error) List() (map[string]settings.RuntimeSettingResponse, error) FullConfig() (string, error) FullConfigBySource() (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 NewLogLevelRuntimeSetting ¶
func NewLogLevelRuntimeSetting() *LogLevelRuntimeSetting
NewLogLevelRuntimeSetting returns a new LogLevelRuntimeSetting
func (*LogLevelRuntimeSetting) Description ¶
func (l *LogLevelRuntimeSetting) Description() string
Description returns the runtime setting's description
func (*LogLevelRuntimeSetting) Get ¶
func (l *LogLevelRuntimeSetting) Get(_ config.Component) (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
type LogPayloadsRuntimeSetting ¶
type LogPayloadsRuntimeSetting struct {
ConfigKey string
}
LogPayloadsRuntimeSetting wraps operations to start logging aggregator payload at runtime.
func NewLogPayloadsRuntimeSetting ¶
func NewLogPayloadsRuntimeSetting() *LogPayloadsRuntimeSetting
NewLogPayloadsRuntimeSetting returns a new LogPayloadsRuntimeSetting
func (*LogPayloadsRuntimeSetting) Description ¶
func (l *LogPayloadsRuntimeSetting) Description() string
Description returns the runtime setting's description
func (*LogPayloadsRuntimeSetting) Get ¶
func (l *LogPayloadsRuntimeSetting) Get(config config.Component) (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
type ProfilingGoroutines ¶
ProfilingGoroutines wraps runtime.SetBlockProfileRate setting
func NewProfilingGoroutines ¶
func NewProfilingGoroutines() *ProfilingGoroutines
NewProfilingGoroutines returns a new ProfilingGoroutines
func (*ProfilingGoroutines) Description ¶
func (r *ProfilingGoroutines) Description() string
Description returns the runtime setting's description
func (*ProfilingGoroutines) Get ¶
func (r *ProfilingGoroutines) Get(config config.Component) (interface{}, error)
Get returns the current value of the runtime setting
func (*ProfilingGoroutines) Hidden ¶
func (r *ProfilingGoroutines) Hidden() bool
Hidden returns whether 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
type ProfilingOpts ¶
type ProfilingOpts struct { ProfileMutex bool ProfileMutexFraction int ProfileBlocking bool ProfileBlockingRate int }
ProfilingOpts defines the options used for profiling
type ProfilingRuntimeSetting ¶
ProfilingRuntimeSetting wraps operations to change profiling at runtime
func NewProfilingRuntimeSetting ¶
func NewProfilingRuntimeSetting(settingName string, service string) *ProfilingRuntimeSetting
NewProfilingRuntimeSetting returns a new ProfilingRuntimeSetting
func (*ProfilingRuntimeSetting) Description ¶
func (l *ProfilingRuntimeSetting) Description() string
Description returns the runtime setting's description
func (*ProfilingRuntimeSetting) Get ¶
func (l *ProfilingRuntimeSetting) Get(config config.Component) (interface{}, error)
Get returns the current value of the runtime setting
func (*ProfilingRuntimeSetting) Hidden ¶
func (l *ProfilingRuntimeSetting) Hidden() bool
Hidden returns whether 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
type RuntimeBlockProfileRate ¶
type RuntimeBlockProfileRate struct {
ConfigPrefix string
}
RuntimeBlockProfileRate wraps runtime.SetBlockProfileRate setting
func NewRuntimeBlockProfileRate ¶
func NewRuntimeBlockProfileRate() *RuntimeBlockProfileRate
NewRuntimeBlockProfileRate returns a new RuntimeBlockProfileRate
func (*RuntimeBlockProfileRate) Description ¶
func (r *RuntimeBlockProfileRate) Description() string
Description returns the runtime setting's description
func (*RuntimeBlockProfileRate) Get ¶
func (r *RuntimeBlockProfileRate) Get(_ config.Component) (interface{}, error)
Get returns the current value of the runtime setting
func (*RuntimeBlockProfileRate) Hidden ¶
func (r *RuntimeBlockProfileRate) Hidden() bool
Hidden returns whether 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
type RuntimeMutexProfileFraction ¶
RuntimeMutexProfileFraction wraps runtime.SetMutexProfileFraction setting.
func NewRuntimeMutexProfileFraction ¶
func NewRuntimeMutexProfileFraction() *RuntimeMutexProfileFraction
NewRuntimeMutexProfileFraction returns a new RuntimeMutexProfileFraction
func (*RuntimeMutexProfileFraction) Description ¶
func (r *RuntimeMutexProfileFraction) Description() string
Description returns the runtime setting's description
func (*RuntimeMutexProfileFraction) Get ¶
func (r *RuntimeMutexProfileFraction) Get(_ config.Component) (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
Source Files ¶
- api.go
- runtime_profiling.go
- runtime_profiling_common.go
- runtime_setting.go
- runtime_setting_activity_dump.go
- runtime_setting_block_profile_rate.go
- runtime_setting_log_level.go
- runtime_setting_log_payloads.go
- runtime_setting_mutex_profile_fraction.go
- runtime_setting_profiling.go
- runtine_setting_profiling_goroutines.go