Documentation ¶
Index ¶
- Constants
- Variables
- func DeregisterProducer(name string)
- func DeregisterrConsumer(name string)
- func NewBuilder() container.StandardBuilder
- func RegisterConsumer(resolver mqcResover)
- func RegisterProducer(resolver imqpResover)
- type ConsumeCallback
- type IComponentQueue
- type IMQC
- type IMQCMessage
- type IMQP
- type IQueue
- type Message
- type MsgItem
- type StandardQueue
- type TaskInfo
Constants ¶
View Source
const (
TypeNode = "queues"
)
Variables ¶
View Source
var DefaultMaxQueueLen = 100
默认最大队列长度 500
View Source
var Nil error = errors.New("Queue Nil")
Functions ¶
func NewBuilder ¶
func NewBuilder() container.StandardBuilder
Types ¶
type ConsumeCallback ¶
type ConsumeCallback func(IMQCMessage)
type IComponentQueue ¶
IComponentQueue Component Queue
type IMQC ¶
type IMQC interface { Connect() error Consume(task TaskInfo, callback ConsumeCallback) (err error) Unconsume(queue string) Start() Close() }
IMQC consumer接口
type IMQCMessage ¶
type IMQCMessage interface { RetryCount() int64 Ack() error Nack(error) error Original() string GetMessage() Message }
IMQCMessage 队列消息
type IMQP ¶
type IMQP interface { Push(key string, value Message) error DelayPush(key string, value Message, delaySeconds int64) error Count(key string) (int64, error) Close() error }
IMQP 消息生产
type IQueue ¶
type IQueue interface { Send(ctx context.Context, key string, value interface{}) error DelaySend(ctx context.Context, key string, value interface{}, delaySeconds int64) error Count(key string) (int64, error) }
IQueue 消息队列
type MsgItem ¶
type StandardQueue ¶
func NewStandardQueue ¶
func NewStandardQueue(c container.Container) StandardQueue
NewStandardQueue 创建queue
Click to show internal directories.
Click to hide internal directories.