queue

package
v2.0.88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal added in v2.0.13

func Marshal(v any) ([]byte, error)

func NewQueue

func NewQueue(prefix string, queue queueLib.IQueue) queueLib.IQueue

NewQueue 创建对应上下文队列

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

func (e *Queue) RpcRequest(ctx context.Context, key string, data []byte, optionFuncs ...func(*queueLib.ClientOptions)) ([]byte, error)

func (*Queue) Run

func (e *Queue) Run(ctx context.Context)

Run 运行

func (*Queue) Shutdown

func (e *Queue) Shutdown(ctx context.Context)

Shutdown 停止

func (*Queue) String

func (e *Queue) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL