MCPcopy Create free account
hub / github.com/cortexproject/cortex / wrapDistributorPush

Method wrapDistributorPush

pkg/api/api.go:119–125  ·  view source on GitHub ↗

Push either wraps the distributor push function as configured or returns the distributor push directly.

(d *distributor.Distributor)

Source from the content-addressed store, hash-verified

117
118// Push either wraps the distributor push function as configured or returns the distributor push directly.
119func (cfg *Config) wrapDistributorPush(d *distributor.Distributor) push.Func {
120 if cfg.DistributorPushWrapper != nil {
121 return cfg.DistributorPushWrapper(d.Push)
122 }
123
124 return d.Push
125}
126
127// compileCORSRegexString compiles given string and adds anchors
128func compileCORSRegexString(s string) (*regexp.Regexp, error) {

Callers 1

RegisterDistributorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected