Documentation ¶
Index ¶
Constants ¶
View Source
const ( ChannelPrefix = "rumors.event." ChannelArticles = ChannelPrefix + "articles" ChannelTg = ChannelPrefix + "telegram" OpMarshal = "pubsub: marshal" OpPublish = "pubsub: publish" OpClose = "pubsub: close" )
View Source
const PluginName = "pubsub"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func NewSubscriber ¶
func NewSubscriber(rdbMaker common.RedisMaker) (*Subscriber, error)
func (*Subscriber) All ¶
func (s *Subscriber) All(ctx context.Context) *redis.PubSub
func (*Subscriber) Articles ¶
func (s *Subscriber) Articles(ctx context.Context) *redis.PubSub
func (*Subscriber) Close ¶
func (s *Subscriber) Close() (err error)
func (*Subscriber) Telegram ¶
func (s *Subscriber) Telegram(ctx context.Context) *redis.PubSub
Click to show internal directories.
Click to hide internal directories.