config

package
v0.0.0-...-f347ef5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 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 {
	Config    string
	DB        DBConfig
	Kafka     KafkaConfig
	Port      string
	LogFile   string
	LogConfig lumber.LoggingConfig
	Env       string
	Verbose   bool
	Tracing   TracingConfig
}

Config the application's configuration

var GlobalConfig *Config

GlobalConfig stores the config instance for global use

func Load

func Load(cmd *cobra.Command) (*Config, error)

Load loads config from command instance to predefined config variables

type ConfigWrapper

type ConfigWrapper struct {
	Config `json:"data"`
}

ConfigWrapper is a wrapper for the config

type DBConfig

type DBConfig struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	Name     string `json:"name"`
}

DBConfig providers the mysql db configuration.

type KafkaConfig

type KafkaConfig struct {
	Brokers string `json:"brokers"`
	Topic   string `json:"topic"`
}

KafkaConfig provides the kafka configuration.

type TracingConfig

type TracingConfig struct {
	// OtelEndpoint for storing host name for otel collector
	OtelEndpoint string
}

TracingConfig provides opentelemetry configurations

Jump to

Keyboard shortcuts

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