Versions in this module Expand all Collapse all v1 v1.15.1 Nov 7, 2019 Changes in this version + func AddFlags(flagSet *flag.FlagSet) + func FloatEquals(a, b float64) bool + func NewProcessor(opts Options, hostname string, storage samplingstore.Store, ...) (ss.StrategyStore, error) + func TruncateFloat(v float64) string + type Factory struct + func NewFactory() *Factory + func (f *Factory) AddFlags(flagSet *flag.FlagSet) + func (f *Factory) CreateStrategyStore() (strategystore.StrategyStore, error) + func (f *Factory) InitFromViper(v *viper.Viper) + func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error + type Options struct + AggregationBuckets int + BucketsForCalculation int + CalculationInterval time.Duration + Delay time.Duration + DeltaTolerance float64 + FollowerLeaseRefreshInterval time.Duration + InitialSamplingProbability float64 + LeaderLeaseRefreshInterval time.Duration + MinSamplesPerSecond float64 + MinSamplingProbability float64 + TargetSamplesPerSecond float64 + func (opts Options) InitFromViper(v *viper.Viper) Options + type SamplingCache map[string]map[string]*SamplingCacheEntry + func (s SamplingCache) Get(service, operation string) *SamplingCacheEntry + func (s SamplingCache) Set(service, operation string, entry *SamplingCacheEntry) + type SamplingCacheEntry struct + Probability float64 + UsingAdaptive bool + type WeightVectorCache struct + func NewWeightVectorCache() *WeightVectorCache + func (c *WeightVectorCache) GetWeights(length int) []float64