config

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfFileName defines config file name.
	ConfFileName = "./etc/app.ini"
	// SectionServer is a section name for grpc server.
	SectionServer = "kelvins-server"
	// SectionHttpServer is a section name for http
	SectionHttpServer = "kelvins-http-server"
	// SectionHttpRateLimit is a section mame for http
	SectionHttpRateLimit = "kelvins-http-rate-limit"
	// SectionLogger is a section name for logger.
	SectionLogger = "kelvins-logger"
	// SectionMysql is a sectoin name for mysql.
	SectionMysql = "kelvins-mysql"
	// SectionG2cache is a section name for g2cache
	SectionG2cache = "kelvins-g2cache"
	// SectionRedis is a section name for redis
	SectionRedis = "kelvins-redis"
	// SectionMongodb is a section name for mongodb
	SectionMongoDB = "kelvins-mongodb"
	// SectionQueueRedis is a section name for redis queue
	SectionQueueRedis = "kelvins-queue-redis"
	// SectionQueueAliAMQP is a section name for ali amqp
	SectionQueueAliAMQP = "kelvins-queue-ali-amqp"
	// SectionQueueAMQP is a section name for amqp
	SectionQueueAMQP = "kelvins-queue-amqp"
	// SectionQueueAliRocketMQ is a section name for ali-rocketmq
	SectionQueueAliRocketMQ = "kelvins-queue-ali-rocketmq"
	// SectionQueueServer is a section name for queue-server
	SectionQueueServer = "kelvins-queue-server"
	// SectionGPool is goroutine pool
	SectionGPool = "kelvins-gpool"
	// SectionJwt is jwt
	SectionJwt = "kelvins-jwt"
	// SectionAuth is rpc auth ,just for compatibility, it will be deleted in the future
	SectionAuth = "kelvins-auth"
	// SectionRPCAuth is rpc auth
	SectionRPCAuth = "kelvins-rpc-auth"
	// SectionRPCServerParams is server rpc params
	SectionRPCServerParams = "kelvins-rpc-server"
	// SectionRPCServerKeepaliveParams is server rpc keep alive params
	SectionRPCServerKeepaliveParams = "kelvins-rpc-server-kp"
	// SectionRPCServerKeepaliveEnforcementPolicy is server rpc keep alive enf policy
	SectionRPCServerKeepaliveEnforcementPolicy = "kelvins-rpc-server-kep"
	// SectionRPCClientKeepaliveParams is client rpc keep alive params
	SectionRPCClientKeepaliveParams = "kelvins-rpc-client-kp"
	// SectionRPCTransportBuffer is rpc transport buffer
	SectionRPCTransportBuffer = "kelvins-rpc-transport-buffer"
	// SectionRPCRateLimit is rpc rate limit
	SectionRPCRateLimit = "kelvins-rpc-rate-limit"
	// SectionTransactionSeata  is seata support
	SectionTransactionSeata = "kelvins-transaction-seata"
)
View Source
const (
	// ETCD V3 Server URL
	ENV_ETCDV3_SERVER_URL = "ETCDV3_SERVER_URL"
	// ETCD V3 Server URLs
	ENV_ETCDV3_SERVER_URLS = "ETCDV3_SERVER_URLS"
	// GO_ENV
	GO_ENV = "GO_ENV"
)
View Source
const (
	DefaultEnvironmentDev     = "dev"
	DefaultEnvironmentTest    = "test"
	DefaultEnvironmentRelease = "release"
	DefaultEnvironmentProd    = "prod"
)

Variables

This section is empty.

Functions

func GetEtcdV3ServerURL

func GetEtcdV3ServerURL() string

GetEtcdV3ServerURL gets etcd v3 server url config from env.

func GetEtcdV3ServerURLs

func GetEtcdV3ServerURLs() string

GetEtcdV3ServerURLs gets etcd v3 server urls config from env.

func LoadDefaultConfig

func LoadDefaultConfig(application *kelvins.Application) error

LoadDefaultConfig loads config form cfg.

func MapConfig

func MapConfig(section string, v interface{})

MapConfig uses cfg to map config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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