Documentation ¶
Index ¶
- func SetDefaultLimitsForYAMLUnmarshalling(defaults Config)
- type Config
- type TenantConfigProvider
- type TenantConfigs
- func (o *TenantConfigs) LimitedLogPushErrors(userID string) bool
- func (o *TenantConfigs) LogDuplicateMetrics(userID string) bool
- func (o *TenantConfigs) LogDuplicateStreamInfo(userID string) bool
- func (o *TenantConfigs) LogPushRequest(userID string) bool
- func (o *TenantConfigs) LogPushRequestStreams(userID string) bool
- func (o *TenantConfigs) LogStreamCreation(userID string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultLimitsForYAMLUnmarshalling ¶
func SetDefaultLimitsForYAMLUnmarshalling(defaults Config)
SetDefaultLimitsForYAMLUnmarshalling sets global default limits, used when loading Limits from YAML files. This is used to ensure per-tenant limits are defaulted to those values.
Types ¶
type Config ¶
type Config struct { LogStreamCreation bool `yaml:"log_stream_creation"` LogPushRequest bool `yaml:"log_push_request"` LogPushRequestStreams bool `yaml:"log_push_request_streams"` LogDuplicateMetrics bool `yaml:"log_duplicate_metrics"` LogDuplicateStreamInfo bool `yaml:"log_duplicate_stream_info"` // LimitedLogPushErrors is to be implemented and will allow logging push failures at a controlled pace. LimitedLogPushErrors bool `yaml:"limited_log_push_errors"` }
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to config this to the given FlagSet
type TenantConfigProvider ¶
TenantConfigProvider serves a tenant or default config.
type TenantConfigs ¶
type TenantConfigs struct {
TenantConfigProvider
}
TenantConfigs periodically fetch a set of per-user configs, and provides convenience functions for fetching the correct value.
func DefaultTenantConfigs ¶
func DefaultTenantConfigs() *TenantConfigs
DefaultTenantConfigs creates and returns a new TenantConfigs with the defaults populated. Only useful for testing, the provider will ignore any tenants passed in.
func NewTenantConfigs ¶
func NewTenantConfigs(configProvider TenantConfigProvider) (*TenantConfigs, error)
NewTenantConfigs makes a new TenantConfigs
func (*TenantConfigs) LimitedLogPushErrors ¶
func (o *TenantConfigs) LimitedLogPushErrors(userID string) bool
func (*TenantConfigs) LogDuplicateMetrics ¶ added in v3.2.0
func (o *TenantConfigs) LogDuplicateMetrics(userID string) bool
func (*TenantConfigs) LogDuplicateStreamInfo ¶ added in v3.2.0
func (o *TenantConfigs) LogDuplicateStreamInfo(userID string) bool
func (*TenantConfigs) LogPushRequest ¶
func (o *TenantConfigs) LogPushRequest(userID string) bool
func (*TenantConfigs) LogPushRequestStreams ¶
func (o *TenantConfigs) LogPushRequestStreams(userID string) bool
func (*TenantConfigs) LogStreamCreation ¶
func (o *TenantConfigs) LogStreamCreation(userID string) bool
Click to show internal directories.
Click to hide internal directories.