Documentation ¶
Index ¶
- func Marshal(v any) ([]byte, error)
- func NewQueue(prefix string, queue queueLib.IQueue) queueLib.IQueue
- type Queue
- func (e *Queue) Consumer(ctx context.Context, name string, f queueLib.ConsumerFunc, ...)
- func (e *Queue) Publish(ctx context.Context, msg message.IMessage, ...) error
- func (e *Queue) RpcRequest(ctx context.Context, key string, data []byte, ...) ([]byte, error)
- func (e *Queue) Run(ctx context.Context)
- func (e *Queue) Shutdown(ctx context.Context)
- func (e *Queue) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) Consumer ¶
func (e *Queue) Consumer(ctx context.Context, name string, f queueLib.ConsumerFunc, optionFuncs ...func(*queueLib.ConsumeOptions))
Consumer 注册消费者
func (*Queue) Publish ¶
func (e *Queue) Publish(ctx context.Context, msg message.IMessage, optionFuncs ...func(*queueLib.PublishOptions)) error
Publish 数据生产者
func (*Queue) RpcRequest ¶ added in v2.0.23
Click to show internal directories.
Click to hide internal directories.