config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 4 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 {
	LogLevel string `validate:"required"`
	HTTPPort uint16 `validate:"required"`
	Kafka    Kafka
}

Config contains all the configuration variables for this service

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from defaults file

type Kafka

type Kafka struct {
	Version             string   `validate:"required"`
	Brokers             []string `validate:"gt=0,dive,hostname_port"`
	ClientID            string   `validate:"lowercase,printascii"`
	LocationOutputTopic string   `validate:"required,lowercase,printascii"`
}

Kafka contains the config for kafka

Jump to

Keyboard shortcuts

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