conf

package
v0.0.0-...-764886a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogLevel

func LogLevel() klog.Level

Types

type Config

type Config struct {
	Kitex struct {
		Service  string `mapstructure:"service"`
		Address  string `mapstructure:"address"`
		LogLevel string `mapstructure:"log_level"`
		OtlpAddr string `mapstructure:"otlp_address"`
	} `mapstructure:"kitex"`

	Registry struct {
		RegistryAddress []string `mapstructure:"registry_address"`
		Username        string   `mapstructure:"username"`
		Password        string   `mapstructure:"password"`
	} `mapstructure:"registry"`

	MySQL struct {
		Host     string `mapstructure:"host"`
		Port     string `mapstructure:"port"`
		Username string `mapstructure:"username"`
		Password string `mapstructure:"password"`
	} `mapstructure:"mysql"`

	Redis struct {
		Address  string `mapstructure:"address"`
		Username string `mapstructure:"username"`
		Password string `mapstructure:"password"`
		DB       int    `mapstructure:"db"`
	} `mapstructure:"redis"`
}

func GetConf

func GetConf() *Config

GetConf gets configuration instance

Jump to

Keyboard shortcuts

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