config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Listener string     `yaml:"listener"`
	Logger   zap.Config `yaml:"logger"`
	DataPath string     `yaml:"data_path"`
	Sources  []Source   `yaml:"sources"`
}

func DefaultConfig

func DefaultConfig() *Config

func NewConfig

func NewConfig(path string) (*Config, error)

NewConfig returns a new decoded Config struct

type Source

type Source struct {
	Enabled     bool                        `yaml:"enabled"`
	FileConfig  *sources.FileSourceConfig   `yaml:"file-config,omitempty"`
	KafkaConfig *sources.KafkaSourceConfig  `yaml:"kafka-config,omitempty"`
	CsvParser   []*parsers.CsvParserConfig  `yaml:"csv-parsers,omitempty"`
	JsonParser  []*parsers.JsonParserConfig `yaml:"json-parsers,omitempty"`
}

Jump to

Keyboard shortcuts

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