Imports #
"encoding/json"
"os"
"strings"
"golang.org/x/telemetry/internal/telemetry"
"encoding/json"
"os"
"strings"
"golang.org/x/telemetry/internal/telemetry"
Config is a wrapper around telemetry.UploadConfig that provides some convenience methods for checking the contents of a report.
type Config struct {
*telemetry.UploadConfig
program map[string]bool
goos map[string]bool
goarch map[string]bool
goversion map[string]bool
pgversion map[pgkey]bool
pgcounter map[pgkey]bool
pgcounterprefix map[pgkey]bool
pgstack map[pgkey]bool
rate map[pgkey]float64
}type pgkey struct {
program string
key string
}Expand takes a counter defined with buckets and expands it into distinct strings for each bucket.
func Expand(counter string) []stringfunc (r *Config) HasCounter(program string, counter string) boolfunc (r *Config) HasCounterPrefix(program string, prefix string) boolfunc (r *Config) HasGOARCH(s string) boolfunc (r *Config) HasGOOS(s string) boolfunc (r *Config) HasGoVersion(s string) boolfunc (r *Config) HasProgram(s string) boolfunc (r *Config) HasStack(program string, stack string) boolfunc (r *Config) HasVersion(program string, version string) boolfunc NewConfig(cfg *telemetry.UploadConfig) *Configfunc (r *Config) Rate(program string, name string) float64func ReadConfig(file string) (*Config, error)func set(slice []string) map[string]boolGenerated with Arrow