config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(data []byte, cfg *Config) error

func LoadFile

func LoadFile(filename string, cfg *Config) error

func SetDefaults added in v0.5.2

func SetDefaults(cfg *Config)

Types

type ClickHouse

type ClickHouse struct {
	Host     string `default:"127.0.0.1" yaml:"host"`
	Port     string `default:"9000" yaml:"port"`
	Database string `default:"default" yaml:"database"`
	User     string `default:"default" yaml:"user"`
	Password string `default:"" yaml:"password"`

	Client ClickHouseClient `default:"{}" yaml:"client"`
}

type ClickHouseClient added in v0.9.0

type ClickHouseClient struct {
	MaxConcurrentQueries int64 `default:"0" yaml:"max_concurrent_queries"`
}

type Config

type Config struct {
	ClickHouse ClickHouse `default:"{}" yaml:"clickhouse"`
	Server     Server     `default:"{}" yaml:"server"`
	HTTP       HTTP       `default:"{}" yaml:"http"`
	Log        Log        `default:"{}" yaml:"log"`
}

type HTTP added in v0.5.2

type HTTP struct {
	Enabled bool   `default:"true" yaml:"enabled"`
	Host    string `default:"127.0.0.1" yaml:"host"`
	Port    string `default:"9100" yaml:"port"`
	Debug   bool   `default:"false" yaml:"debug"`
}

type Log

type Log struct {
	Level  string `default:"info" yaml:"level"`
	Format string `default:"text" yaml:"format"`
}

type Server

type Server struct {
	Host string `default:"0.0.0.0" yaml:"host"`
	Port string `default:"0" yaml:"port"`
}

Jump to

Keyboard shortcuts

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