func NewStorage(l log.Logger, reg prometheus.Registerer, stCallback startTimeCallback, walDir string, flushDeadline time.Duration) *Storage {
	if l == nil {
		l = log.NewNopLogger()
	}
	s := &Storage{
		logger:                 logging.Dedupe(l, 1*time.Minute),
		localStartTimeCallback: stCallback,
		flushDeadline:          flushDeadline,
		samplesIn:              newEWMARate(ewmaWeight, shardUpdateDuration),
		walDir:                 walDir,
	}
	go s.run()
	return s
}
func NewStorage(l log.Logger, reg prometheus.Registerer, stCallback startTimeCallback, walDir string, flushDeadline time.Duration) *Storage {
	if l == nil {
		l = log.NewNopLogger()
	}
	s := &Storage{
		logger:                 logging.Dedupe(l, 1*time.Minute),
		localStartTimeCallback: stCallback,
		flushDeadline:          flushDeadline,
		samplesIn:              newEWMARate(ewmaWeight, shardUpdateDuration),
		walDir:                 walDir,
	}
	go s.run()
	return s
}
func NewStorage ( l log . Logger , reg prometheus . Registerer , stCallback startTimeCallback , walDir string , flushDeadline time . Duration ) * Storage { if l == nil { l = log . NewNopLogger ( ) } s := & Storage { logger : logging . Dedupe ( l , 1 * time . Minute ) , localStartTimeCallback : stCallback , flushDeadline : flushDeadline , samplesIn : newEWMARate ( ewmaWeight , shardUpdateDuration ) , walDir : walDir , } go s . run ( ) return s }
// NewStorage returns a remote.Storage.
NewStorage returns a remote . Storage .