Documentation ¶
Index ¶
- Constants
- func GetGiftInfoKey(giftId int64) string
- func GetRoomInfoKey(roomId int64) string
- func GetUserAssetEventMsgKey(userId int64, eventId string) string
- func GetUserAssetInfoKey(userId int64, assetType string) string
- func GetUserAssetInfoLockKey(userId int64, tag string) string
- func GetUserInfoKey(userId int64) string
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 GetRoomInfoKey ¶
func GetUserAssetEventMsgKey ¶
func GetUserAssetInfoKey ¶
func GetUserAssetInfoLockKey ¶
func GetUserInfoKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.