goconsts

package
v1.0.1-rel-01 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QUEUE_NAME_SYNC_DB_QUERY = "QueueSyncGeneralDB.EsQuery"
	QUEUE_NAME_SYNC_DB_CMD   = "QueueSyncGeneralDB.Cmd"

	NatsUrl = "nats://huawei.akunlong.top:4222" //os.Getenv("NATS_URL")

	CHANNEL_NUMBER  = 10
	ChanSize        = 100
	RequestWaitTime = 30 * time.Second
	NextMsgTimeout  = 10 * time.Second
)

读取环境变量来提高安全性和灵活性

View Source
const (
	QUEUE_NAME_SYNC_ES        = "GeneralEsSync.ES"
	QUEUE_NAME_SYNC_ESQuery   = "GeneralEsSync.ESQuery"
	QUEUE_NAME_SYNC_ESCmd     = "GeneralEsSync.ESCmd"
	QUEUE_NAME_SYNC_ESMeta    = "GeneralEsSync.ESMeta"
	QUEUE_NAME_SYNC_ESKeyword = "GeneralEsSync.ESKeyword"

	QUEUE_NAME_SYNC_DEFAULT  = "QueueSyncGeneralEs"
	QUEUE_NAME_ASYNC_DEFAULT = "QueueAsyncGeneralEs"

	//获取性能统计消息
	Topic_Async_Notify_PRE = "GeneralDefault.*"
	TopicGeneralSyncSTAT   = "GeneralEsSync.STAT"
	Topic_Async_NotifyCMS  = "GeneralDefault.CMS"

	Topic_DOMAIN_GENEAL_SyncES_PRE     = "GeneralEsSync.*"
	Topic_DOMAIN_GENEAL_SyncES_BIZ     = "GeneralEsSync.BIZ"
	Topic_DOMAIN_GENEAL_SyncES_CMS     = "GeneralEsSync.CMS"
	Topic_DOMAIN_GENEAL_SyncES_CONTACT = "GeneralEsSync.CONTACT"

	Topic_DOMAIN_GENEAL_AsyncES_PRE = "GeneralEsAsync.*"
	Topic_DOMAIN_GENEAL_AsyncES_BIZ = "GeneralEsAsync.BIZ"
	Topic_DOMAIN_GENEAL_ASyncES_CMS = "GeneralEsAsync.CMS"

	Topic_Async_Website_Prefix  = "GeneralAsyncWebsite.*"
	Topic_Async_Website_Default = "GeneralAsyncWebsite.website"
	Topic_Async_Default         = "GeneralAsyncDefault.XXX"
	Topic_Async_DefaultPrefix   = "GeneralAsyncDefault.*"
)

通过环境变量或配置文件管理敏感信息,这里仅为示例

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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