Documentation
¶
Index ¶
- Constants
- type ClassOptionsConfig
- type Config
- func (c *Config) ConfigDir() string
- func (c *Config) ConfigGroup() string
- func (c *Config) ConfigName() string
- func (c *Config) ConfigPath() string
- func (c *Config) ConfigUser() string
- func (cfg *Config) Load() (err error)
- func (cfg *Config) Save() (err error)
- func (c *Config) String() string
- func (c *Config) TelemetryClassEnabled(class types.TelemetryClass) bool
- func (c *Config) TelemetryTypeEnabled(telemetry types.TelemetryType) bool
- type DBConfig
- type LogConfig
Constants ¶
View Source
const ( // config file defaults DEF_CFG_DIR = `/etc/susetelemetry` DEF_CFG_FILE = `telemetry.yaml` DEF_CFG_PATH = DEF_CFG_DIR + `/` + DEF_CFG_FILE DEF_CFG_USER = `susetelm` DEF_CFG_GROUP = `susetelm` DEF_CFG_PERM = 0640 // config defaults DEF_CFG_ENABLED = false DEF_CFG_BASE_URL = `https://scc.suse.com/telemetry/` DEF_CFG_CLIENT_ID = `` DEF_CFG_CUSTOMER_ID = `` // data store defaults DEF_CFG_DB_DRIVER = `sqlite3` DEF_CFG_DB_DIR = `/var/lib/` + DEF_CFG_USER + `/client` DEF_CFG_DB_FILE = `telemetry.db` DEF_CFG_DB_PATH = DEF_CFG_DB_DIR + `/` + DEF_CFG_DB_FILE // logging defaults DEF_CFG_LOG_LEVEL = `info` DEF_CFG_LOG_LOCATION = `stderr` DEF_CFG_LOG_STYLE = `text` // class defaults DEF_CFG_OPT_OUT = true DEF_CFG_OPT_IN = false )
Variables ¶
This section is empty.
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"`
}
telemetry class options configuration
func (*ClassOptionsConfig) String ¶
func (cc *ClassOptionsConfig) String() string
type Config ¶
type Config struct {
TelemetryBaseURL string `yaml:"telemetry_base_url"`
Enabled bool `yaml:"enabled"`
ClientId string `yaml:"client_id"`
CustomerId string `yaml:"customer_id"`
Tags types.Tags `yaml:"tags"`
DataStores DBConfig `yaml:"datastores"`
ClassOptions ClassOptionsConfig `yaml:"class_options"`
Logging LogConfig `yaml:"logging"`
Extras any `yaml:"extras,omitempty"`
// contains filtered or unexported fields
}
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
func (*Config) ConfigGroup ¶
func (*Config) ConfigName ¶
func (*Config) ConfigPath ¶
func (*Config) ConfigUser ¶
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.