config

package
v0.0.0-...-19e62f4 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApacheTimeLayout = "02/Jan/2006:15:04:05 -0700"
View Source
var CHDateLayout = "2006-01-02"
View Source
var CHTimeLayout = "2006-01-02 15:04:00"

Functions

This section is empty.

Types

type Config

type Config struct {
	Settings struct {
		Interval    int    `yaml:"interval"`
		LogPath     string `yaml:"log_path"`
		SeekFromEnd bool   `yaml:"seek_from_end"`
		Once        bool   `yaml:"once"`
		StdIn       bool   `yaml:"stdin"`
		Domain      string `yaml:"domain"`
		Debug       bool   `yaml:"debug"`
	} `yaml:"settings"`

	ClickHouse struct {
		Db          string   `yaml:"db"`
		Table       string   `yaml:"table"`
		Host        string   `yaml:"host"`
		Port        string   `yaml:"port"`
		Columns     []string `yaml:"columns"`
		Credentials struct {
			User     string `yaml:"user"`
			Password string `yaml:"password"`
		} `yaml:"credentials"`
	} `yaml:"clickhouse"`

	Log struct {
		Format         string `yaml:"format"`
		OptionalFields bool   `yaml:"optional_fields"`
	} `yaml:"log"`
}

func Read

func Read() *Config

func (*Config) SetEnvVariables

func (c *Config) SetEnvVariables()

Jump to

Keyboard shortcuts

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