Documentation ¶
Index ¶
- func NewRedisStream(config config.MQConfig, logger zerolog.Logger) (mq.MQ, error)
- type Consumer
- type RedisStream
- func (stream *RedisStream) InitSubscriber(ctx context.Context, projectID, topicID string, subIDs ...string) error
- func (stream *RedisStream) InitTopic(ctx context.Context, projectID, topicID string) error
- func (stream *RedisStream) Publish(distributedID int64, projectID, topicID string, message []byte) error
- func (stream *RedisStream) Stop()
- func (stream *RedisStream) Subscribe(projectID, subscription string, process func(context.Context, []byte) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
type RedisStream ¶
type RedisStream struct {
// contains filtered or unexported fields
}
func (*RedisStream) InitSubscriber ¶
func (*RedisStream) InitTopic ¶
func (stream *RedisStream) InitTopic(ctx context.Context, projectID, topicID string) error
func (*RedisStream) Publish ¶
func (stream *RedisStream) Publish(distributedID int64, projectID, topicID string, message []byte) error
func (*RedisStream) Stop ¶
func (stream *RedisStream) Stop()
Click to show internal directories.
Click to hide internal directories.