Documentation ¶
Index ¶
- Constants
- Variables
- func SetDefaultLimitsForYAMLUnmarshalling(defaults Limits)
- type ErrStreamRateLimit
- type Limits
- type Overrides
- func (o *Overrides) AllByUserID() map[string]*Limits
- func (o *Overrides) CardinalityLimit(userID string) int
- func (o *Overrides) CreationGracePeriod(userID string) time.Duration
- func (o *Overrides) DefaultLimits() *Limits
- func (o *Overrides) EnforceMetricName(userID string) bool
- func (o *Overrides) EvaluationDelay(userID string) time.Duration
- func (o *Overrides) IngestionBurstSizeBytes(userID string) int
- func (o *Overrides) IngestionRateBytes(userID string) float64
- func (o *Overrides) IngestionRateStrategy() string
- func (o *Overrides) MaxCacheFreshness(userID string) time.Duration
- func (o *Overrides) MaxChunksPerQuery(userID string) int
- func (o *Overrides) MaxChunksPerQueryFromStore(userID string) int
- func (o *Overrides) MaxConcurrentTailRequests(userID string) int
- func (o *Overrides) MaxEntriesLimitPerQuery(userID string) int
- func (o *Overrides) MaxGlobalStreamsPerUser(userID string) int
- func (o *Overrides) MaxLabelNameLength(userID string) int
- func (o *Overrides) MaxLabelNamesPerSeries(userID string) int
- func (o *Overrides) MaxLabelValueLength(userID string) int
- func (o *Overrides) MaxLineSize(userID string) int
- func (o *Overrides) MaxLineSizeTruncate(userID string) bool
- func (o *Overrides) MaxLocalStreamsPerUser(userID string) int
- func (o *Overrides) MaxQueriersPerUser(userID string) int
- func (o *Overrides) MaxQueryLength(userID string) time.Duration
- func (o *Overrides) MaxQueryLookback(userID string) time.Duration
- func (o *Overrides) MaxQueryParallelism(userID string) int
- func (o *Overrides) MaxQuerySeries(userID string) int
- func (o *Overrides) MaxStreamsMatchersPerQuery(userID string) int
- func (o *Overrides) MinShardingLookback(userID string) time.Duration
- func (o *Overrides) PerStreamRateLimit(userID string) RateLimit
- func (o *Overrides) QueryReadyIndexNumDays(userID string) int
- func (o *Overrides) QuerySplitDuration(userID string) time.Duration
- func (o *Overrides) RejectOldSamples(userID string) bool
- func (o *Overrides) RejectOldSamplesMaxAge(userID string) time.Duration
- func (o *Overrides) RetentionPeriod(userID string) time.Duration
- func (o *Overrides) RulerMaxRuleGroupsPerTenant(userID string) int
- func (o *Overrides) RulerMaxRulesPerRuleGroup(userID string) int
- func (o *Overrides) RulerRemoteWriteDisabled(userID string) bool
- func (o *Overrides) RulerRemoteWriteHeaders(userID string) map[string]string
- func (o *Overrides) RulerRemoteWriteQueueBatchSendDeadline(userID string) time.Duration
- func (o *Overrides) RulerRemoteWriteQueueCapacity(userID string) int
- func (o *Overrides) RulerRemoteWriteQueueMaxBackoff(userID string) time.Duration
- func (o *Overrides) RulerRemoteWriteQueueMaxSamplesPerSend(userID string) int
- func (o *Overrides) RulerRemoteWriteQueueMaxShards(userID string) int
- func (o *Overrides) RulerRemoteWriteQueueMinBackoff(userID string) time.Duration
- func (o *Overrides) RulerRemoteWriteQueueMinShards(userID string) int
- func (o *Overrides) RulerRemoteWriteQueueRetryOnRateLimit(userID string) bool
- func (o *Overrides) RulerRemoteWriteRelabelConfigs(userID string) []*util.RelabelConfig
- func (o *Overrides) RulerRemoteWriteTimeout(userID string) time.Duration
- func (o *Overrides) RulerRemoteWriteURL(userID string) string
- func (o *Overrides) RulerTenantShardSize(userID string) int
- func (o *Overrides) StreamRetention(userID string) []StreamRetention
- func (o *Overrides) UnorderedWrites(userID string) bool
- type OverridesExporter
- type OverwriteMarshalingStringMap
- func (sm *OverwriteMarshalingStringMap) Map() map[string]string
- func (sm OverwriteMarshalingStringMap) MarshalJSON() ([]byte, error)
- func (sm OverwriteMarshalingStringMap) MarshalYAML() (interface{}, error)
- func (sm *OverwriteMarshalingStringMap) UnmarshalJSON(val []byte) error
- func (sm *OverwriteMarshalingStringMap) UnmarshalYAML(unmarshal func(interface{}) error) error
- type RateLimit
- type StreamRetention
- type TenantLimits
Constants ¶
const ( // LocalRateLimitStrat represents a ingestion rate limiting strategy that enforces the limit // on a per distributor basis. // // The actual effective rate limit will be N times higher, where N is the number of distributor replicas. LocalIngestionRateStrategy = "local" // GlobalRateLimitStrat represents a ingestion rate limiting strategy that enforces the rate // limiting globally, configuring a per-distributor local rate limiter as "ingestion_rate / N", // where N is the number of distributor replicas (it's automatically adjusted if the // number of replicas change). // // The global strategy requires the distributors to form their own ring, which // is used to keep track of the current number of healthy distributor replicas. GlobalIngestionRateStrategy = "global" )
const ( ReasonLabel = "reason" // InvalidLabels is a reason for discarding log lines which have labels that cannot be parsed. InvalidLabels = "invalid_labels" MissingLabels = "missing_labels" MissingLabelsErrorMsg = "error at least one label pair is required per stream" InvalidLabelsErrorMsg = "Error parsing labels '%s' with error: %s" // RateLimited is one of the values for the reason to discard samples. // Declared here to avoid duplication in ingester and distributor. RateLimited = "rate_limited" RateLimitedErrorMsg = "" /* 212-byte string literal not displayed */ // LineTooLong is a reason for discarding too long log lines. LineTooLong = "line_too_long" LineTooLongErrorMsg = "Max entry size '%d' bytes exceeded for stream '%s' while adding an entry with length '%d' bytes" // StreamLimit is a reason for discarding lines when we can't create a new stream // because the limit of active streams has been reached. StreamLimit = "stream_limit" StreamLimitErrorMsg = "" /* 185-byte string literal not displayed */ // StreamRateLimit is a reason for discarding lines when the streams own rate limit is hit // rather than the overall ingestion rate limit. StreamRateLimit = "per_stream_rate_limit" OutOfOrder = "out_of_order" TooFarBehind = "too_far_behind" // GreaterThanMaxSampleAge is a reason for discarding log lines which are older than the current time - `reject_old_samples_max_age` GreaterThanMaxSampleAge = "greater_than_max_sample_age" GreaterThanMaxSampleAgeErrorMsg = "entry for stream '%s' has timestamp too old: %v, oldest acceptable timestamp is: %v" // TooFarInFuture is a reason for discarding log lines which are newer than the current time + `creation_grace_period` TooFarInFuture = "too_far_in_future" TooFarInFutureErrorMsg = "entry for stream '%s' has timestamp too new: %v" // MaxLabelNamesPerSeries is a reason for discarding a log line which has too many label names MaxLabelNamesPerSeries = "max_label_names_per_series" MaxLabelNamesPerSeriesErrorMsg = "entry for stream '%s' has %d label names; limit %d" // LabelNameTooLong is a reason for discarding a log line which has a label name too long LabelNameTooLong = "label_name_too_long" LabelNameTooLongErrorMsg = "stream '%s' has label name too long: '%s'" // LabelValueTooLong is a reason for discarding a log line which has a lable value too long LabelValueTooLong = "label_value_too_long" LabelValueTooLongErrorMsg = "stream '%s' has label value too long: '%s'" // DuplicateLabelNames is a reason for discarding a log line which has duplicate label names DuplicateLabelNames = "duplicate_label_names" DuplicateLabelNamesErrorMsg = "stream '%s' has duplicate label name: '%s'" )
Variables ¶
var DiscardedBytes = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "loki", Name: "discarded_bytes_total", Help: "The total number of bytes that were discarded.", }, []string{ReasonLabel, "tenant"}, )
DiscardedBytes is a metric of the total discarded bytes, by reason.
var DiscardedSamples = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "loki", Name: "discarded_samples_total", Help: "The total number of samples that were discarded.", }, []string{ReasonLabel, "tenant"}, )
DiscardedSamples is a metric of the number of discarded samples, by reason.
var MutatedBytes = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "loki", Name: "mutated_bytes_total", Help: "The total number of bytes that have been mutated.", }, []string{ReasonLabel, "truncated"}, )
MutatedBytes is a metric of the total mutated bytes, by reason.
var MutatedSamples = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "loki", Name: "mutated_samples_total", Help: "The total number of samples that have been mutated.", }, []string{ReasonLabel, "truncated"}, )
MutatedSamples is a metric of the total number of lines mutated, by reason.
var Unlimited = RateLimit{ Limit: rate.Inf, Burst: 0, }
Functions ¶
func SetDefaultLimitsForYAMLUnmarshalling ¶
func SetDefaultLimitsForYAMLUnmarshalling(defaults Limits)
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 ErrStreamRateLimit ¶
func (*ErrStreamRateLimit) Error ¶
func (e *ErrStreamRateLimit) Error() string
type Limits ¶
type Limits struct { // Distributor enforced limits. IngestionRateStrategy string `yaml:"ingestion_rate_strategy" json:"ingestion_rate_strategy"` IngestionRateMB float64 `yaml:"ingestion_rate_mb" json:"ingestion_rate_mb"` IngestionBurstSizeMB float64 `yaml:"ingestion_burst_size_mb" json:"ingestion_burst_size_mb"` MaxLabelNameLength int `yaml:"max_label_name_length" json:"max_label_name_length"` MaxLabelValueLength int `yaml:"max_label_value_length" json:"max_label_value_length"` MaxLabelNamesPerSeries int `yaml:"max_label_names_per_series" json:"max_label_names_per_series"` RejectOldSamples bool `yaml:"reject_old_samples" json:"reject_old_samples"` RejectOldSamplesMaxAge model.Duration `yaml:"reject_old_samples_max_age" json:"reject_old_samples_max_age"` CreationGracePeriod model.Duration `yaml:"creation_grace_period" json:"creation_grace_period"` EnforceMetricName bool `yaml:"enforce_metric_name" json:"enforce_metric_name"` MaxLineSize flagext.ByteSize `yaml:"max_line_size" json:"max_line_size"` MaxLineSizeTruncate bool `yaml:"max_line_size_truncate" json:"max_line_size_truncate"` // Ingester enforced limits. MaxLocalStreamsPerUser int `yaml:"max_streams_per_user" json:"max_streams_per_user"` MaxGlobalStreamsPerUser int `yaml:"max_global_streams_per_user" json:"max_global_streams_per_user"` UnorderedWrites bool `yaml:"unordered_writes" json:"unordered_writes"` PerStreamRateLimit flagext.ByteSize `yaml:"per_stream_rate_limit" json:"per_stream_rate_limit"` PerStreamRateLimitBurst flagext.ByteSize `yaml:"per_stream_rate_limit_burst" json:"per_stream_rate_limit_burst"` // Querier enforced limits. MaxChunksPerQuery int `yaml:"max_chunks_per_query" json:"max_chunks_per_query"` MaxQuerySeries int `yaml:"max_query_series" json:"max_query_series"` MaxQueryLookback model.Duration `yaml:"max_query_lookback" json:"max_query_lookback"` MaxQueryLength model.Duration `yaml:"max_query_length" json:"max_query_length"` MaxQueryParallelism int `yaml:"max_query_parallelism" json:"max_query_parallelism"` CardinalityLimit int `yaml:"cardinality_limit" json:"cardinality_limit"` MaxStreamsMatchersPerQuery int `yaml:"max_streams_matchers_per_query" json:"max_streams_matchers_per_query"` MaxConcurrentTailRequests int `yaml:"max_concurrent_tail_requests" json:"max_concurrent_tail_requests"` MaxEntriesLimitPerQuery int `yaml:"max_entries_limit_per_query" json:"max_entries_limit_per_query"` MaxCacheFreshness model.Duration `yaml:"max_cache_freshness_per_query" json:"max_cache_freshness_per_query"` MaxQueriersPerTenant int `yaml:"max_queriers_per_tenant" json:"max_queriers_per_tenant"` QueryReadyIndexNumDays int `yaml:"query_ready_index_num_days" json:"query_ready_index_num_days"` // Query frontend enforced limits. The default is actually parameterized by the queryrange config. QuerySplitDuration model.Duration `yaml:"split_queries_by_interval" json:"split_queries_by_interval"` MinShardingLookback model.Duration `yaml:"min_sharding_lookback" json:"min_sharding_lookback"` // Ruler defaults and limits. RulerEvaluationDelay model.Duration `yaml:"ruler_evaluation_delay_duration" json:"ruler_evaluation_delay_duration"` RulerMaxRulesPerRuleGroup int `yaml:"ruler_max_rules_per_rule_group" json:"ruler_max_rules_per_rule_group"` RulerMaxRuleGroupsPerTenant int `yaml:"ruler_max_rule_groups_per_tenant" json:"ruler_max_rule_groups_per_tenant"` // this field is the inversion of the general remote_write.enabled because the zero value of a boolean is false, // and if it were ruler_remote_write_enabled, it would be impossible to know if the value was explicitly set or default RulerRemoteWriteDisabled bool `yaml:"ruler_remote_write_disabled" json:"ruler_remote_write_disabled"` RulerRemoteWriteURL string `yaml:"ruler_remote_write_url" json:"ruler_remote_write_url"` RulerRemoteWriteTimeout time.Duration `yaml:"ruler_remote_write_timeout" json:"ruler_remote_write_timeout"` RulerRemoteWriteHeaders OverwriteMarshalingStringMap `yaml:"ruler_remote_write_headers" json:"ruler_remote_write_headers"` RulerRemoteWriteRelabelConfigs []*util.RelabelConfig `yaml:"ruler_remote_write_relabel_configs,omitempty" json:"ruler_remote_write_relabel_configs,omitempty"` RulerRemoteWriteQueueCapacity int `yaml:"ruler_remote_write_queue_capacity" json:"ruler_remote_write_queue_capacity"` RulerRemoteWriteQueueMinShards int `yaml:"ruler_remote_write_queue_min_shards" json:"ruler_remote_write_queue_min_shards"` RulerRemoteWriteQueueMaxShards int `yaml:"ruler_remote_write_queue_max_shards" json:"ruler_remote_write_queue_max_shards"` RulerRemoteWriteQueueMaxSamplesPerSend int `yaml:"ruler_remote_write_queue_max_samples_per_send" json:"ruler_remote_write_queue_max_samples_per_send"` RulerRemoteWriteQueueBatchSendDeadline time.Duration `yaml:"ruler_remote_write_queue_batch_send_deadline" json:"ruler_remote_write_queue_batch_send_deadline"` RulerRemoteWriteQueueMinBackoff time.Duration `yaml:"ruler_remote_write_queue_min_backoff" json:"ruler_remote_write_queue_min_backoff"` RulerRemoteWriteQueueMaxBackoff time.Duration `yaml:"ruler_remote_write_queue_max_backoff" json:"ruler_remote_write_queue_max_backoff"` RulerRemoteWriteQueueRetryOnRateLimit bool `yaml:"ruler_remote_write_queue_retry_on_ratelimit" json:"ruler_remote_write_queue_retry_on_ratelimit"` // Global and per tenant retention RetentionPeriod model.Duration `yaml:"retention_period" json:"retention_period"` StreamRetention []StreamRetention `yaml:"retention_stream,omitempty" json:"retention_stream,omitempty"` // Config for overrides, convenient if it goes here. PerTenantOverrideConfig string `yaml:"per_tenant_override_config" json:"per_tenant_override_config"` PerTenantOverridePeriod model.Duration `yaml:"per_tenant_override_period" json:"per_tenant_override_period"` }
Limits describe all the limits for users; can be used to describe global default limits via flags, or per-user limits via yaml config. NOTE: we use custom `model.Duration` instead of standard `time.Duration` because, to support user-friendly duration format (e.g: "1h30m45s") in JSON value.
func (*Limits) RegisterFlags ¶
RegisterFlags adds the flags required to config this to the given FlagSet
func (*Limits) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Overrides ¶
type Overrides struct {
// contains filtered or unexported fields
}
Overrides periodically fetch a set of per-user overrides, and provides convenience functions for fetching the correct value.
func NewOverrides ¶
func NewOverrides(defaults Limits, tenantLimits TenantLimits) (*Overrides, error)
NewOverrides makes a new Overrides.
func (*Overrides) AllByUserID ¶
func (*Overrides) CardinalityLimit ¶
CardinalityLimit whether to enforce the presence of a metric name.
func (*Overrides) CreationGracePeriod ¶
CreationGracePeriod is misnamed, and actually returns how far into the future we should accept samples.
func (*Overrides) DefaultLimits ¶
func (*Overrides) EnforceMetricName ¶
EnforceMetricName whether to enforce the presence of a metric name.
func (*Overrides) EvaluationDelay ¶
EvaluationDelay returns the rules evaluation delay for a given user.
func (*Overrides) IngestionBurstSizeBytes ¶
IngestionBurstSizeBytes returns the burst size for ingestion rate.
func (*Overrides) IngestionRateBytes ¶
IngestionRateBytes returns the limit on ingester rate (MBs per second).
func (*Overrides) IngestionRateStrategy ¶
IngestionRateStrategy returns whether the ingestion rate limit should be individually applied to each distributor instance (local) or evenly shared across the cluster (global).
func (*Overrides) MaxCacheFreshness ¶
func (*Overrides) MaxChunksPerQuery ¶
MaxChunksPerQuery returns the maximum number of chunks allowed per query.
func (*Overrides) MaxChunksPerQueryFromStore ¶
Compatibility with Cortex interface, this method is set to be removed in 1.12, so nooping in Loki until then.
func (*Overrides) MaxConcurrentTailRequests ¶
MaxConcurrentTailRequests returns the limit to number of concurrent tail requests.
func (*Overrides) MaxEntriesLimitPerQuery ¶
MaxEntriesLimitPerQuery returns the limit to number of entries the querier should return per query.
func (*Overrides) MaxGlobalStreamsPerUser ¶
MaxGlobalStreamsPerUser returns the maximum number of streams a user is allowed to store across the cluster.
func (*Overrides) MaxLabelNameLength ¶
MaxLabelNameLength returns maximum length a label name can be.
func (*Overrides) MaxLabelNamesPerSeries ¶
MaxLabelNamesPerSeries returns maximum number of label/value pairs timeseries.
func (*Overrides) MaxLabelValueLength ¶
MaxLabelValueLength returns maximum length a label value can be. This also is the maximum length of a metric name.
func (*Overrides) MaxLineSize ¶
MaxLineSize returns the maximum size in bytes the distributor should allow.
func (*Overrides) MaxLineSizeTruncate ¶
MaxLineSizeShouldTruncate returns whether lines longer than max should be truncated.
func (*Overrides) MaxLocalStreamsPerUser ¶
MaxLocalStreamsPerUser returns the maximum number of streams a user is allowed to store in a single ingester.
func (*Overrides) MaxQueriersPerUser ¶
MaxQueriersPerUser returns the maximum number of queriers that can handle requests for this user.
func (*Overrides) MaxQueryLength ¶
MaxQueryLength returns the limit of the length (in time) of a query.
func (*Overrides) MaxQueryLookback ¶
MaxQueryLookback returns the max lookback period of queries.
func (*Overrides) MaxQueryParallelism ¶
MaxQueryParallelism returns the limit to the number of sub-queries the frontend will process in parallel.
func (*Overrides) MaxQuerySeries ¶
MaxQueryLength returns the limit of the series of metric queries.
func (*Overrides) MaxStreamsMatchersPerQuery ¶
MaxStreamsMatchersPerQuery returns the limit to number of streams matchers per query.
func (*Overrides) MinShardingLookback ¶
MinShardingLookback returns the tenant specific min sharding lookback (e.g from when we should start sharding).
func (*Overrides) PerStreamRateLimit ¶
func (*Overrides) QueryReadyIndexNumDays ¶
QueryReadyIndexNumDays returns the number of days for which we have to be query ready for a user.
func (*Overrides) QuerySplitDuration ¶
QuerySplitDuration returns the tenant specific splitby interval applied in the query frontend.
func (*Overrides) RejectOldSamples ¶
RejectOldSamples returns true when we should reject samples older than certain age.
func (*Overrides) RejectOldSamplesMaxAge ¶
RejectOldSamplesMaxAge returns the age at which samples should be rejected.
func (*Overrides) RetentionPeriod ¶
RetentionPeriod returns the retention period for a given user.
func (*Overrides) RulerMaxRuleGroupsPerTenant ¶
RulerMaxRuleGroupsPerTenant returns the maximum number of rule groups for a given user.
func (*Overrides) RulerMaxRulesPerRuleGroup ¶
RulerMaxRulesPerRuleGroup returns the maximum number of rules per rule group for a given user.
func (*Overrides) RulerRemoteWriteDisabled ¶
RulerRemoteWriteDisabled returns whether remote-write is disabled for a given user or not.
func (*Overrides) RulerRemoteWriteHeaders ¶
RulerRemoteWriteHeaders returns the headers to use in a remote-write for a given user.
func (*Overrides) RulerRemoteWriteQueueBatchSendDeadline ¶
RulerRemoteWriteQueueBatchSendDeadline returns the maximum time a sample will be buffered before being discarded for a given user.
func (*Overrides) RulerRemoteWriteQueueCapacity ¶
RulerRemoteWriteQueueCapacity returns the queue capacity to use in a remote-write for a given user.
func (*Overrides) RulerRemoteWriteQueueMaxBackoff ¶
RulerRemoteWriteQueueMaxBackoff returns the maximum time for an exponential backoff for a given user.
func (*Overrides) RulerRemoteWriteQueueMaxSamplesPerSend ¶
RulerRemoteWriteQueueMaxSamplesPerSend returns the max samples to send in a remote-write for a given user.
func (*Overrides) RulerRemoteWriteQueueMaxShards ¶
RulerRemoteWriteQueueMaxShards returns the maximum shards to use in a remote-write for a given user.
func (*Overrides) RulerRemoteWriteQueueMinBackoff ¶
RulerRemoteWriteQueueMinBackoff returns the minimum time for an exponential backoff for a given user.
func (*Overrides) RulerRemoteWriteQueueMinShards ¶
RulerRemoteWriteQueueMinShards returns the minimum shards to use in a remote-write for a given user.
func (*Overrides) RulerRemoteWriteQueueRetryOnRateLimit ¶
RulerRemoteWriteQueueRetryOnRateLimit returns whether to retry failed remote-write requests (429 response) for a given user.
func (*Overrides) RulerRemoteWriteRelabelConfigs ¶
func (o *Overrides) RulerRemoteWriteRelabelConfigs(userID string) []*util.RelabelConfig
RulerRemoteWriteRelabelConfigs returns the write relabel configs to use in a remote-write for a given user.
func (*Overrides) RulerRemoteWriteTimeout ¶
RulerRemoteWriteTimeout returns the duration after which to timeout a remote-write request for a given user.
func (*Overrides) RulerRemoteWriteURL ¶
RulerRemoteWriteURL returns the remote-write URL to use for a given user.
func (*Overrides) RulerTenantShardSize ¶
RulerTenantShardSize returns shard size (number of rulers) used by this tenant when using shuffle-sharding strategy. Not used in Loki.
func (*Overrides) StreamRetention ¶
func (o *Overrides) StreamRetention(userID string) []StreamRetention
StreamRetention returns the retention period for a given user.
func (*Overrides) UnorderedWrites ¶
type OverridesExporter ¶
type OverridesExporter struct {
// contains filtered or unexported fields
}
func NewOverridesExporter ¶
func NewOverridesExporter(overrides *Overrides) *OverridesExporter
TODO(jordanrushing): break out overrides from defaults?
func (*OverridesExporter) Collect ¶
func (oe *OverridesExporter) Collect(ch chan<- prometheus.Metric)
func (*OverridesExporter) Describe ¶
func (oe *OverridesExporter) Describe(ch chan<- *prometheus.Desc)
type OverwriteMarshalingStringMap ¶
type OverwriteMarshalingStringMap struct {
// contains filtered or unexported fields
}
OverwriteMarshalingStringMap will overwrite the src map when unmarshaling as opposed to merging.
func NewOverwriteMarshalingStringMap ¶
func NewOverwriteMarshalingStringMap(m map[string]string) OverwriteMarshalingStringMap
func (*OverwriteMarshalingStringMap) Map ¶
func (sm *OverwriteMarshalingStringMap) Map() map[string]string
func (OverwriteMarshalingStringMap) MarshalJSON ¶
func (sm OverwriteMarshalingStringMap) MarshalJSON() ([]byte, error)
MarshalJSON explicitly uses the the type receiver and not pointer receiver or it won't be called
func (OverwriteMarshalingStringMap) MarshalYAML ¶
func (sm OverwriteMarshalingStringMap) MarshalYAML() (interface{}, error)
MarshalYAML explicitly uses the the type receiver and not pointer receiver or it won't be called
func (*OverwriteMarshalingStringMap) UnmarshalJSON ¶
func (sm *OverwriteMarshalingStringMap) UnmarshalJSON(val []byte) error
func (*OverwriteMarshalingStringMap) UnmarshalYAML ¶
func (sm *OverwriteMarshalingStringMap) UnmarshalYAML(unmarshal func(interface{}) error) error
type RateLimit ¶
RateLimit is a colocated limit & burst config. It largely exists to eliminate accidental misconfigurations due to race conditions when requesting the limit & burst config sequentially, between which the Limits configuration may have updated.