Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCfg = Config{ TelemetryBaseURL: "http://localhost:9999/telemetry", Enabled: false, CustomerID: "0", Tags: []string{}, DataStores: DefaultDBCfg, Logging: DefaultLogging, ClassOptions: DefaultClassOptions, }
View Source
var DefaultClassOptions = ClassOptionsConfig{ OptOut: true, OptIn: false, Allow: []types.TelemetryType{}, Deny: []types.TelemetryType{}, }
View Source
var DefaultDBCfg = DBConfig{
Driver: "sqlite3",
Params: "/tmp/telemetry/client/telemetry.db",
}
Defaults
View Source
var DefaultLogging = LogConfig{
Level: "info",
Location: "stderr",
Style: "text",
}
Functions ¶
This section is empty.
Types ¶
type ClassOptionsConfig ¶
type ClassOptionsConfig struct { OptOut bool `yaml:"opt_out" json:"opt_out"` OptIn bool `yaml:"opt_in" json:"opt_in"` Allow []types.TelemetryType `yaml:"allow" json:"allow"` Deny []types.TelemetryType `yaml:"deny" json:"deny"` }
type Config ¶
type Config struct { TelemetryBaseURL string `yaml:"telemetry_base_url"` Enabled bool `yaml:"enabled"` CustomerID string `yaml:"customer_id"` Tags []string `yaml:"tags"` DataStores DBConfig `yaml:"datastores"` ClassOptions ClassOptionsConfig `yaml:"classOptions"` Logging LogConfig `yaml:"logging"` Extras any `yaml:"extras,omitempty"` }
func (*Config) TelemetryClassEnabled ¶
func (c *Config) TelemetryClassEnabled(class types.TelemetryClass) bool
func (*Config) TelemetryTypeEnabled ¶
func (c *Config) TelemetryTypeEnabled(telemetry types.TelemetryType) bool
Click to show internal directories.
Click to hide internal directories.