config

package
v0.0.0-...-5a65518 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvDev  = "dev"
	EnvProd = "prod"
	EnvTest = "test"
	EnvUat  = "uat"
)

Variables

View Source
var (
	Config         ServiceConfig
	Redis          *redistool.Client
	Host           string
	Port           int
	Limiter        *redis_rate.Limiter
	LimitPerSecond int
	IsLimiterOpen  bool
	Uptrace        UptraceConfig
)

Functions

func InitConfig

func InitConfig()

Types

type ServiceConfig

type ServiceConfig struct {
	ServiceName          string `json:"serviceName"`
	IsMetricsOpen        bool   `json:"isMetricsOpen"`
	IsTracingOpen        bool   `json:"isTracingOpen"`
	IsRequestLimiterOpen bool   `json:"isRequestLimiterOpen"`
	Env                  string `json:"env"`
}

type UptraceConfig

type UptraceConfig struct {
	Version string `json:"version"`
	Dsn     string `json:"dsn"`
}

Jump to

Keyboard shortcuts

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