mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Bypass the fanout storage merging if no remote storage is configured.
This commit is contained in:
parent
c3d6abc8e6
commit
4bbef0ec30
|
@ -34,6 +34,10 @@ type fanout struct {
|
||||||
// NewFanout returns a new fan-out Storage, which proxies reads and writes
|
// NewFanout returns a new fan-out Storage, which proxies reads and writes
|
||||||
// through to multiple underlying storages.
|
// through to multiple underlying storages.
|
||||||
func NewFanout(logger log.Logger, primary Storage, secondaries ...Storage) Storage {
|
func NewFanout(logger log.Logger, primary Storage, secondaries ...Storage) Storage {
|
||||||
|
if len(secondaries) == 0 {
|
||||||
|
return primary
|
||||||
|
}
|
||||||
|
|
||||||
return &fanout{
|
return &fanout{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
primary: primary,
|
primary: primary,
|
||||||
|
|
Loading…
Reference in a new issue