Documentation ¶
Index ¶
- type IUMq
- type RedisListPub
- func (q *RedisListPub) Dequeue(ctx context.Context) (string, []byte, error)
- func (q *RedisListPub) Publish(ctx context.Context, topic string, msg string) error
- func (q *RedisListPub) Subscribe(ctx context.Context, topics ...string) error
- func (q *RedisListPub) UnSubscribe(ctx context.Context, topics ...string) error
- type RedisPub
- func (q *RedisPub) Dequeue(ctx context.Context) (string, []byte, error)
- func (q *RedisPub) Publish(ctx context.Context, topic string, msg string) error
- func (q *RedisPub) Subscribe(ctx context.Context, topics ...string) error
- func (q *RedisPub) UnSubscribe(ctx context.Context, topics ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IUMq ¶
type IUMq interface { // Subscribe 订阅 Subscribe(ctx context.Context, topics ...string) error // UnSubscribe 取消订阅 UnSubscribe(ctx context.Context, topics ...string) error // Publish 发布 Publish(ctx context.Context, topic string, msg string) error // Dequeue 获取消息 Dequeue(ctx context.Context) (string, []byte, error) }
type RedisListPub ¶
type RedisListPub struct {
// contains filtered or unexported fields
}
func NewRedisListQueue ¶
func (*RedisListPub) Subscribe ¶
func (q *RedisListPub) Subscribe(ctx context.Context, topics ...string) error
func (*RedisListPub) UnSubscribe ¶
func (q *RedisListPub) UnSubscribe(ctx context.Context, topics ...string) error
Click to show internal directories.
Click to hide internal directories.