新增:频道(topic)细粒度权限控制,是否允许订阅消息、是否允许发送消息到频道

This commit is contained in:
2023-07-16 01:33:25 +08:00
parent 66772cb659
commit bf82800afc
8 changed files with 412 additions and 55 deletions

View File

@@ -89,7 +89,7 @@ type ZConn struct { //ZConn
substoped map[string]chan int // 关闭信号量
ping int64 // 最后心跳时间
pong int64 // 最后心跳回复时间
auth string // 是否已验证授权
user int // 是否已验证授权
}
type Lock struct {
@@ -486,7 +486,7 @@ func Info() map[string]interface{} {
m["groupid"] = c.groupid
m["topics"] = c.topics
m["timers"] = c.timers
m["auth"] = c.auth
m["user"] = c.user
conns = append(conns, m)
}