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
Constants ¶
View Source
const (
TypeNode = "queues"
)
Variables ¶
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(queue string, callback ConsumeCallback) (err error) Unconsume(queue string) Start() Close() }
IMQC consumer接口
type IMQCMessage ¶
IMQCMessage 队列消息
type IMQP ¶
type IMQP interface { Push(key string, value Message) error //Pop(key string) (string, error) Count(key string) (int64, error) Close() error }
IMQP 消息生产
type IQueue ¶
type IQueue interface { Send(ctx context.Context, key string, value interface{}) error //Pop(key string) (string, 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.