Push either wraps the distributor push function as configured or returns the distributor push directly.
(d *distributor.Distributor)
| 117 | |
| 118 | // Push either wraps the distributor push function as configured or returns the distributor push directly. |
| 119 | func (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 |
| 128 | func compileCORSRegexString(s string) (*regexp.Regexp, error) { |