config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{}

Functions

func LoadConfig

func LoadConfig(path string) error

Types

type ClickHouseConfig

type ClickHouseConfig struct {
	Addr        string          `yaml:"addr"`
	DialTimeout time.Duration   `yaml:"dial_timeout"`
	Auth        clickhouse.Auth `yaml:"auth"`
}

type Config

type Config struct {
	Upstream      UpstreamConfig `yaml:"upstream"`
	Server        ServerConfig   `yaml:"server"`
	Database      DatabaseConfig `yaml:"database"`
	Insert        InsertConfig   `yaml:"insert"`
	Tracing       *otlp.Config   `yaml:"tracing"`
	MetadataLimit uint64         `yaml:"metadata_limit"`
	SeriesLimit   uint64         `yaml:"series_limit"`
}

func (*Config) GetTracingServiceName

func (c *Config) GetTracingServiceName() string

func (*Config) IsTracingEnabled

func (c *Config) IsTracingEnabled() bool

type DatabaseConfig

type DatabaseConfig struct {
	Provider   string           `yaml:"provider"`
	ClickHouse ClickHouseConfig `yaml:"clickhouse"`
	PostgreSQL PostgreSQLConfig `yaml:"postgresql"`
	SQLite     SQLiteConfig     `yaml:"sqlite"`
}

type InsertConfig

type InsertConfig struct {
	BatchSize     int           `yaml:"batch_size"`
	BufferSize    int           `yaml:"buffer_size"`
	FlushInterval time.Duration `yaml:"flush_interval"`
	GracePeriod   time.Duration `yaml:"grace_period"`
	Timeout       time.Duration `yaml:"timeout"`
}

type PostgreSQLConfig

type PostgreSQLConfig struct {
	Addr        string        `yaml:"addr"`
	Database    string        `yaml:"database"`
	DialTimeout time.Duration `yaml:"dial_timeout"`
	Password    string        `yaml:"password"`
	Port        int           `yaml:"port"`
	SSLMode     string        `yaml:"sslmode"`
	User        string        `yaml:"user"`
}

type SQLiteConfig

type SQLiteConfig struct {
	DatabasePath string `yaml:"database_path"`
}

type ServerConfig

type ServerConfig struct {
	InsecureListenAddress string `yaml:"insecure_listen_address"`
}

type UpstreamConfig

type UpstreamConfig struct {
	URL               string `yaml:"url"`
	IncludeQueryStats bool   `yaml:"include_query_stats"`
}

Jump to

Keyboard shortcuts

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