config

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 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"
	// SectionLogger is a section name for logger.
	SectionLogger = "kelvins-logger"
	// SectionMysql is a sectoin name for mysql.
	SectionMysql = "kelvins-mysql"
	// 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 aliamqp
	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"
)
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"
)

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