config

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: Apache-2.0, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

package config provides methods for loading and querying a telemetry upload config file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(counter string) []string

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 ReadConfig(file string) (*Config, error)

func (*Config) HasCounter

func (r *Config) HasCounter(program, counter string) bool

func (*Config) HasCounterPrefix

func (r *Config) HasCounterPrefix(program, prefix string) bool

func (*Config) HasGOARCH

func (r *Config) HasGOARCH(s string) bool

func (*Config) HasGOOS

func (r *Config) HasGOOS(s string) bool

func (*Config) HasGoVersion

func (r *Config) HasGoVersion(s string) bool

func (*Config) HasProgram

func (r *Config) HasProgram(s string) bool

func (*Config) HasStack

func (r *Config) HasStack(program, stack string) bool

func (*Config) HasVersion

func (r *Config) HasVersion(program, version string) bool

func (*Config) Rate

func (r *Config) Rate(program, name string) float64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL