config

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batcher

type Batcher struct {
	Timeout time.Duration `koanf:"timeout"`
}

type Buffer

type Buffer struct {
	StartTime time.Time
	Interval  time.Duration     `koanf:"interval"`
	Offset    time.Duration     `koanf:"offset"`
	Validator *validator.Config `koanf:"validator"`
}

type Config

type Config struct {
	Batcher     *Batcher       `koanf:"batcher"`
	Pool        *Pool          `koanf:"pool"`
	Destination *Destination   `koanf:"destination"`
	MQTT        *MQTT          `koanf:"mqtt"`
	Log         *logger.Config `koanf:"log"`
}

func Load

func Load() (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Destination

type Destination struct {
	Type     string           `koanf:"type"`
	Buffer   *Buffer          `koanf:"buffer"`
	Database *bqclient.Config `koanf:"database"`
}

type MQTT

type MQTT struct {
	Host     string `koanf:"host"`
	Port     int    `koanf:"port"`
	Username string `koanf:"username"`
	Password string `koanf:"password"`
	QoS      int    `koanf:"qos"`
	Topic    string `koanf:"topic"`
}

type Pool

type Pool struct {
	NumWorkers int `koanf:"num_workers"`
	Capacity   int `koanf:"capacity"`
}

Jump to

Keyboard shortcuts

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