constants

package
v0.0.0-...-2b0c82f Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DaGetAssetsMaxUserIdCn   = 50
	StationChangeMaxAssetsCn = 50
)
View Source
const (
	RedisClientTypeReplica = 1
	RedisClientTypeCluster = 2
)
View Source
const (
	RedisLuaAssetChangeResCodeSuccess  = 0
	RedisLuaAssetChangeResCodeNoDone   = -3
	RedisLuaAssetChangeResCodeNoExists = -1
	RedisLuaAssetChangeResCodeNoEnough = -2
)
View Source
const (
	RedisKeyPrefixUserAssetInfo     = "I.asset."
	RedisKeyPrefixGiftInfo          = "I.gift."
	RedisKeyPrefixUserInfo          = "I.user."
	RedisKeyPrefixRoomInfo          = "I.room."
	RedisKeyPrefixUserAssetInfoLock = "L.asset."
	RedisKeyPrefixAssetEventMsg     = "M.asset."
)
View Source
const (
	RedisKeyExpireUserAssetInfo     = 86400 * time.Second
	RedisKeyExpireGiftInfo          = 7 * 86400 * time.Second
	RedisKeyExpireUserInfo          = 86400 * time.Second
	RedisKeyExpireRoomInfo          = 86400 * time.Second
	RedisKeyExpireUserAssetInfoLock = 60 * time.Second
	RedisKeyExpireAssetEventMsg     = 86400 * time.Second
)
View Source
const (
	DisLockerBlockRetryCn = 100
	// MaxRetries Redis transactions use optimistic locking.
	MaxRetries = 1000
)
View Source
const (
	UserAssetTxMethodCas         = "cas"
	UserAssetTxMethodLua         = "lua"
	UserAssetTxMethodFunctionLua = "function-lua"
)
View Source
const (
	OpUserTypeUnknow = iota
	OpUserTypeActive
	OpUserTypePassive
)
View Source
const (
	SendGiftConsumerEventName    = "sendGiftAssetChange"
	OrderAppleConsumerEventName  = "orderAppleAssetChange"
	OrderWXConsumerEventName     = "orderWXAssetChange"
	OrderAlipayConsumerEventName = "orderAlipayAssetChange"
	OrderDouyinConsumerEventName = "orderDouyinAssetChange"
)
View Source
const (
	TopicUserAssetChange      = "TOPIC_ASSET_CHANGE_EVENT"
	TopicCacheUserAssetChange = "TOPIC_CACHE_ASSET_CHANGE_EVENT"
)
View Source
const (
	ProjectName = "payment"
)
View Source
const (
	StationChangeAssetExeTimeoutS = 1
)
View Source
const (
	TimeOutSetAssetFromCB = 1 * time.Second
)

Variables

This section is empty.

Functions

func GetGiftInfoKey

func GetGiftInfoKey(giftId int64) string

func GetRoomInfoKey

func GetRoomInfoKey(roomId int64) string

func GetUserAssetEventMsgKey

func GetUserAssetEventMsgKey(userId int64, eventId string) string

func GetUserAssetInfoKey

func GetUserAssetInfoKey(userId int64, assetType string) string

func GetUserAssetInfoLockKey

func GetUserAssetInfoLockKey(userId int64, tag string) string

func GetUserInfoKey

func GetUserInfoKey(userId int64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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