Documentation ¶
Index ¶
- func NewDefaultParamSetRefresher(traceStore OPSProvider, numParamSets int, dfBuilder dataframe.DataFrameBuilder, ...) *defaultParamSetRefresher
- func ShouldCacheValue(value string, validValues []string) bool
- type CachedParamSetRefresher
- func (c *CachedParamSetRefresher) GetAll() paramtools.ReadOnlyParamSet
- func (c *CachedParamSetRefresher) GetParamSetForQuery(ctx context.Context, query *query.Query, q url.Values) (int64, paramtools.ParamSet, error)
- func (c *CachedParamSetRefresher) PopulateCache()
- func (c *CachedParamSetRefresher) Start(period time.Duration) error
- func (c *CachedParamSetRefresher) StartRefreshRoutine(refreshPeriod time.Duration)
- type OPSProvider
- type ParamSetRefresher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultParamSetRefresher ¶
func NewDefaultParamSetRefresher(traceStore OPSProvider, numParamSets int, dfBuilder dataframe.DataFrameBuilder, qconfig config.QueryConfig) *defaultParamSetRefresher
NewDefaultParamSetRefresher builds a new *ParamSetRefresher.
func ShouldCacheValue ¶
check whether value is part of the list validValues
Types ¶
type CachedParamSetRefresher ¶
type CachedParamSetRefresher struct {
// contains filtered or unexported fields
}
CachedParamSetRefresher provides a struct to refresh paramsets and store them in the given cache.
func NewCachedParamSetRefresher ¶
func NewCachedParamSetRefresher(psRefresher *defaultParamSetRefresher, cache cache.Cache) *CachedParamSetRefresher
NewCachedParamSetRefresher returns a new instance of the CachedParamSetRefresher.
func (*CachedParamSetRefresher) GetAll ¶
func (c *CachedParamSetRefresher) GetAll() paramtools.ReadOnlyParamSet
GetAll returns the entire ParamSet for the instance.
func (*CachedParamSetRefresher) GetParamSetForQuery ¶
func (c *CachedParamSetRefresher) GetParamSetForQuery(ctx context.Context, query *query.Query, q url.Values) (int64, paramtools.ParamSet, error)
GetParamSetForQuery returns the trace count and paramset for the given query.
func (*CachedParamSetRefresher) PopulateCache ¶
func (c *CachedParamSetRefresher) PopulateCache()
Populate the cache with the paramsets.
func (*CachedParamSetRefresher) Start ¶
func (c *CachedParamSetRefresher) Start(period time.Duration) error
Start the refresher.
func (*CachedParamSetRefresher) StartRefreshRoutine ¶
func (c *CachedParamSetRefresher) StartRefreshRoutine(refreshPeriod time.Duration)
StartRefreshRoutine starts a goroutine to refresh the paramsets in the cache.
type OPSProvider ¶
type OPSProvider interface { GetLatestTile(context.Context) (types.TileNumber, error) GetParamSet(ctx context.Context, tileNumber types.TileNumber) (paramtools.ReadOnlyParamSet, error) }
OPSProvider allows access to OrdererParamSets. TraceStore implements this interface.
type ParamSetRefresher ¶
type ParamSetRefresher interface { // GetAll returns all the paramsets in the instance. GetAll() paramtools.ReadOnlyParamSet // GetParamSetForQuery returns the paramsets filtered for the provided query. GetParamSetForQuery(ctx context.Context, query *query.Query, q url.Values) (int64, paramtools.ParamSet, error) // Start kicks off the param set refresh routine. Start(period time.Duration) error }
ParamSetRefresher provides an interface for accessing instance param sets.