package config
import "golang.org/x/telemetry/internal/config"
package config provides methods for loading and querying a telemetry upload config file.
Index ¶
- func Expand(counter string) []string
- type Config
- func NewConfig(cfg *telemetry.UploadConfig) *Config
- func ReadConfig(file string) (*Config, error)
- func (r *Config) HasCounter(program, counter string) bool
- func (r *Config) HasCounterPrefix(program, prefix string) bool
- func (r *Config) HasGOARCH(s string) bool
- func (r *Config) HasGOOS(s string) bool
- func (r *Config) HasGoVersion(s string) bool
- func (r *Config) HasProgram(s string) bool
- func (r *Config) HasStack(program, stack string) bool
- func (r *Config) HasVersion(program, version string) bool
- func (r *Config) Rate(program, name string) float64
Functions ¶
func Expand ¶
Expand takes a counter defined with buckets and expands it into distinct strings for each bucket.
Types ¶
type Config ¶
type Config struct { *telemetry.UploadConfig // contains filtered or unexported fields }
Config is a wrapper around telemetry.UploadConfig that provides some convenience methods for checking the contents of a report.
func NewConfig ¶
func NewConfig(cfg *telemetry.UploadConfig) *Config
func ReadConfig ¶
func (*Config) HasCounter ¶
func (*Config) HasCounterPrefix ¶
func (*Config) HasGOARCH ¶
func (*Config) HasGOOS ¶
func (*Config) HasGoVersion ¶
func (*Config) HasProgram ¶
func (*Config) HasStack ¶
func (*Config) HasVersion ¶
func (*Config) Rate ¶
Source Files ¶
config.go
- Version
- v0.0.0-20250214215356-6f9b61db478c (latest)
- Published
- Feb 14, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 3 days ago –
Tools for package owners.