首页 > 其他 > 详细

redis 中 发布订阅 的 数据类型

时间:2021-04-29 18:21:25      阅读:16      评论:0      收藏:0      [点我收藏+]
redis 发布订阅中 给管道发送信息 结构体为 
//
Message represents a message notification. type Message struct { // The originating channel. Channel string // The matched pattern, if any Pattern string // The message data. Data []byte } redis 发布订阅中 第一次订阅管道时候 的类型 // Subscription represents a subscribe or unsubscribe notification. type Subscription struct { // Kind is "subscribe", "unsubscribe", "psubscribe" or "punsubscribe" Kind string // The channel that was changed. Channel string // The current number of subscriptions for connection. 成功订阅 就为 1 Count int }
redis ping 测试连接之后
// Pong represents a pubsub pong notification. type Pong struct { Data string }

 

redis 中 发布订阅 的 数据类型

原文:https://www.cnblogs.com/zhaoxianxin/p/14718523.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!