config

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	AnonymousRole          string `yaml:"anonymous_role"`
	BootstrapAdminPassword string `yaml:"bootstrap_admin_password"`
}

type Cache

type Cache struct {
	TTL        timeseries.Duration `yaml:"ttl"`
	GCInterval timeseries.Duration `yaml:"gc_interval"`
}

type Clickhouse

type Clickhouse struct {
	Address       string `yaml:"address"`
	User          string `yaml:"user"`
	Password      string `yaml:"password"`
	Database      string `yaml:"database"`
	TlsEnable     bool   `yaml:"tls_enable"`
	TlsSkipVerify bool   `yaml:"tls_skip_verify"`
}

func (*Clickhouse) Validate

func (c *Clickhouse) Validate() error

type Config

type Config struct {
	ListenAddress string `yaml:"listen_address"`
	UrlBasePath   string `yaml:"url_base_path"`
	DataDir       string `yaml:"data_dir"`
	LicenseKey    string `yaml:"license_key"`

	Cache    Cache    `yaml:"cache"`
	Traces   Traces   `yaml:"traces"`
	Logs     Logs     `yaml:"logs"`
	Profiles Profiles `yaml:"profiles"`

	Postgres         *Postgres   `yaml:"postgres"`
	GlobalPrometheus *Prometheus `yaml:"global_prometheus"`
	GlobalClickhouse *Clickhouse `yaml:"global_clickhouse"`

	Auth Auth `yaml:"auth"`

	Projects []Project `yaml:"projects"`

	DoNotCheckSLO            bool `yaml:"do_not_check_slo"`
	DoNotCheckForDeployments bool `yaml:"do_not_check_for_deployments"`
	DoNotCheckForUpdates     bool `yaml:"do_not_check_for_updates"`
	DisableUsageStatistics   bool `yaml:"disable_usage_statistics"`

	DeveloperMode bool `yaml:"developer_mode"`

	BootstrapClickhouse *Clickhouse `yaml:"-"`
	BootstrapPrometheus *Prometheus `yaml:"-"`
}

func Load

func Load() *Config

func (*Config) Bootstrap

func (cfg *Config) Bootstrap(database *db.DB) error

func (*Config) GetBootstrapClickhouse

func (cfg *Config) GetBootstrapClickhouse() *db.IntegrationClickhouse

func (*Config) GetBootstrapPrometheus

func (cfg *Config) GetBootstrapPrometheus() *db.IntegrationPrometheus

func (*Config) GetGlobalClickhouse

func (cfg *Config) GetGlobalClickhouse() *db.IntegrationClickhouse

func (*Config) GetGlobalPrometheus

func (cfg *Config) GetGlobalPrometheus() *db.IntegrationPrometheus

func (*Config) GetProjects

func (cfg *Config) GetProjects() []db.Project

type Logs added in v1.8.9

type Logs struct {
	TTL timeseries.Duration `yaml:"ttl"`
}

type Postgres

type Postgres struct {
	ConnectionString string `yaml:"connection_string"`
}

type Profiles added in v1.8.9

type Profiles struct {
	TTL timeseries.Duration `yaml:"ttl"`
}

type Project

type Project struct {
	Name    string      `yaml:"name"`
	ApiKeys []db.ApiKey `yaml:"api_keys"`
}

type Prometheus

type Prometheus struct {
	Url             string              `yaml:"url"`
	RefreshInterval timeseries.Duration `yaml:"refresh_interval"`
	TlsSkipVerify   bool                `yaml:"tls_skip_verify"`
	User            string              `yaml:"user"`
	Password        string              `yaml:"password"`
	ExtraSelector   string              `yaml:"extra_selector"`
	CustomHeaders   map[string]string   `yaml:"custom_headers"`
	RemoteWriteUrl  string              `yaml:"remote_write_url"`
}

func (*Prometheus) Validate

func (p *Prometheus) Validate() error

type Traces added in v1.8.9

type Traces struct {
	TTL timeseries.Duration `yaml:"ttl"`
}

Jump to

Keyboard shortcuts

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