redis 中 发布订阅 的 数据类型
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 }
邮箱: 1090055252@qq.com