github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/querier/queryrange/queryrangebase/limits_test.go (about)

     1  package queryrangebase
     2  
     3  import (
     4  	"time"
     5  )
     6  
     7  type mockLimits struct {
     8  	maxQueryLookback  time.Duration
     9  	maxQueryLength    time.Duration
    10  	maxCacheFreshness time.Duration
    11  }
    12  
    13  func (m mockLimits) MaxQueryLookback(string) time.Duration {
    14  	return m.maxQueryLookback
    15  }
    16  
    17  func (m mockLimits) MaxQueryLength(string) time.Duration {
    18  	return m.maxQueryLength
    19  }
    20  
    21  func (mockLimits) MaxQueryParallelism(string) int {
    22  	return 14 // Flag default.
    23  }
    24  
    25  func (m mockLimits) MaxCacheFreshness(string) time.Duration {
    26  	return m.maxCacheFreshness
    27  }