diff --git a/_const/rediskey/key.go b/_const/rediskey/key.go index 6d4662a2ba0594ad9f8268eed2bf9de08d1810ec..5aecfcad403ce017563ac362dabbd4fa6342f275 100644 --- a/_const/rediskey/key.go +++ b/_const/rediskey/key.go @@ -53,4 +53,5 @@ const ( Game1V1EnterRoom = "game:oneAndOne:%s" // 1v1游戏,进入某个房间,%s: imGroupId Game1V1GameChannel = "game:gameChannel:%s" // 1v1游戏,发布订阅channel,游戏创建成功后的通知,%s: imGroupId Game1V1ResetGameRoom = "game:resetGameRoom:%s" // 1v1游戏,把某个房间重新放回匹配池,%s: txGroupId + Game1V1RoomRobot = "game:oneAndOneRobot:%s" // 1v1游戏,某个房间匹配到的机器人,%s: txGroupId, val: 机器人uid ) diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index ab1d7c358eca3fe94d5a7d4a003bf3450f5c36eb..3955655d9b0dec636021ce67b7ed9ede2be6b7b5 100644 --- a/_const/rediskey/key_func.go +++ b/_const/rediskey/key_func.go @@ -119,3 +119,7 @@ func GetGame1V1GameChannel(imGroupId string) string { func GetGame1V1ResetGameRoom(txGroupId string) string { return fmt.Sprintf(Game1V1ResetGameRoom, txGroupId) } + +func GetGame1V1RoomRobot(txGroupId string) string { + return fmt.Sprintf(Game1V1RoomRobot, txGroupId) +}