Documentation ¶
Index ¶
- Constants
- Variables
- func IsErrBusyGroup(err error) bool
- type Data
- type Event
- type Mq
- func (mq *Mq) Close(timeout time.Duration) error
- func (mq *Mq) Commit(ctx context.Context, topic string, idList ...string) (okCount int64, err error)
- func (mq *Mq) Consume(maxCount int64, blockTime time.Duration, startId string) (msgChan <-chan []Msg, err error)
- func (mq *Mq) FullInfo(ctx context.Context, topic string, count int) (info *redis.XInfoStreamFull, err error)
- func (mq *Mq) Group(ctx context.Context, startId string) (err error)
- func (mq *Mq) Info(ctx context.Context, topic string) (info *redis.XInfoStream, err error)
- func (mq *Mq) Pending(ctx context.Context, topic string, minIdleDuration time.Duration, count int64) (list []redis.XPendingExt, err error)
- func (mq *Mq) PendingWithConsumer(ctx context.Context, topic string, minIdleDuration time.Duration, count int64) (list []redis.XPendingExt, err error)
- func (mq *Mq) PipeSend(ctx context.Context, msgList ...Msg) (docIdList []string, err error)
- func (mq *Mq) Send(ctx context.Context, msg Msg) (docId string, err error)
- func (mq *Mq) Trigger(ctx context.Context, topic string, events ...Event) (docIdList []string, err error)
- type Msg
- type Option
Constants ¶
View Source
const ( Earliest = `0` Latest = `$` )
Variables ¶
Functions ¶
func IsErrBusyGroup ¶
Types ¶
type Mq ¶
type Mq struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewProducer ¶
func (*Mq) PendingWithConsumer ¶
type Option ¶
type Option struct { Group string `json:"group" yaml:"group"` Consumer string `json:"consumer" yaml:"consumer"` ConsumerTopic string `json:"consumerTopic" yaml:"consumerTopic"` ChanSize int64 `json:"chanSize" yaml:"chanSize"` RetryIntervalSecond int64 `json:"retryIntervalSecond" yaml:"retryIntervalSecond"` AutoCommit bool `json:"autoCommit" yaml:"autoCommit"` MaxLength int64 `json:"maxLength" yaml:"maxLength"` MsgMinIdleSecond int64 `json:"msgMinIdleSecond" yaml:"msgMinIdleSecond"` }
func (Option) MsgMinIdle ¶
func (Option) RetryDuration ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.