Versions in this module Expand all Collapse all v0 v0.0.1 Mar 4, 2022 Changes in this version + func NewEventBusByRedis(client *redis.Client) (eventbus.EventBus, error) + type PubSub struct + func (r *PubSub) HandleCount(topic string) int + func (r *PubSub) Publish(ctx context.Context, topic string, msg *eventbus.Message) (err error) + func (r *PubSub) Subscribe(ctx context.Context, topic string, handle eventbus.SubscribeHandler) (err error) + func (r *PubSub) SubscribeOnce(ctx context.Context, topic string, handle eventbus.SubscribeHandler) (err error) + func (r *PubSub) Unsubscribe(ctx context.Context, topic string, handle eventbus.SubscribeHandler) (err error) + type Stream struct + func (r *Stream) HandleCount(topic string) int + func (r *Stream) Publish(ctx context.Context, topic string, msg *eventbus.Message) (err error) + func (r *Stream) Subscribe(ctx context.Context, topic string, handle eventbus.SubscribeHandler) (err error) + func (r *Stream) SubscribeOnce(ctx context.Context, topic string, handle eventbus.SubscribeHandler) (err error) + func (r *Stream) Unsubscribe(ctx context.Context, topic string, handle eventbus.SubscribeHandler) (err error)