xenv

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 2 Imported by: 17

Documentation

Index

Constants

View Source
const (
	AppEnv       = "APP_ENV"
	AppName      = "APP_NAME"
	AppVersion   = "APP_VERSION"
	TraceName    = "TRACE_NAME"
	ApolloUrl    = "APOLLO_URL"
	ApolloAppID  = "APOLLO_APPID"
	ApolloSecret = "APOLLO_ACCESS_KEY_SECRET"

	GrpcPort  = "GRPC_PORT"
	HttpPort  = "HTTP_PORT"
	PprofPort = "PPROF_PORT"
)

Variables

This section is empty.

Functions

func GetApolloCluster added in v0.0.4

func GetApolloCluster(cluster string) string

func GetApolloNamespace added in v0.0.4

func GetApolloNamespace(namespace string) string

func GetApolloSecret added in v0.0.4

func GetApolloSecret() string

func GetEnv

func GetEnv(envName string) string

func Init

func Init(userConf map[string]string)

Init 初始化环境配置 ENV > userConf > default

func IsDebug

func IsDebug(v string) bool

IsDebug 是否为debug模式

func IsDev added in v0.0.5

func IsDev() bool

func IsLocal added in v0.0.5

func IsLocal() bool

func IsProd added in v0.0.5

func IsProd() bool

func IsTest added in v0.0.5

func IsTest() bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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