Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
Consumer define the consumer of message queue service
func NewConsumer ¶
NewConsumer returns a new consumer of message queue service
type LocalConsumer ¶
type LocalConsumer struct {
// contains filtered or unexported fields
}
LocalConsumer define the comsumer for local message queue based on channel
func (*LocalConsumer) Config ¶
func (c *LocalConsumer) Config() string
Config returns config of local message queue
func (*LocalConsumer) Subject ¶
func (c *LocalConsumer) Subject() string
Subject returns subject of local message queue
func (*LocalConsumer) Subscribe ¶
func (c *LocalConsumer) Subscribe(listener Listener) error
Subscribe sets the listener for local message queue based on channel
type LocalProducer ¶
type LocalProducer struct {
// contains filtered or unexported fields
}
LocalProducer define the producer for local message queue based on channel
func (*LocalProducer) Config ¶
func (p *LocalProducer) Config() string
Config returns config of local message queue
func (*LocalProducer) Produce ¶
func (p *LocalProducer) Produce(data []byte) error
Produce sends data to local message queue
func (*LocalProducer) Subject ¶
func (p *LocalProducer) Subject() string
Subject returns subject of local message queue
type LocalQueue ¶
type LocalQueue struct { Subject string Config string sync.Mutex // contains filtered or unexported fields }
LocalQueue implements a inner version of message queue
func (*LocalQueue) NewConsumer ¶
func (q *LocalQueue) NewConsumer() (c Consumer, err error)
NewConsumer returns a new consumer for the message queue
func (*LocalQueue) NewProducer ¶
func (q *LocalQueue) NewProducer() (p Producer, err error)
NewProducer returns a new producer for the message queue
type NatsConsumer ¶
type NatsConsumer struct {
// contains filtered or unexported fields
}
NatsConsumer define the consumer for local message queue based on channel
func (*NatsConsumer) Config ¶
func (c *NatsConsumer) Config() string
Config returns config of local message queue
func (*NatsConsumer) Subject ¶
func (c *NatsConsumer) Subject() string
Subject returns subject of local message queue
func (*NatsConsumer) Subscribe ¶
func (c *NatsConsumer) Subscribe(listener Listener) (err error)
Subscribe sets the listener for local message queue based on channel
type NatsProducer ¶
type NatsProducer struct {
// contains filtered or unexported fields
}
NatsProducer define the producer for local message queue based on channel
func (*NatsProducer) Config ¶
func (p *NatsProducer) Config() string
Config returns config of local message queue
func (*NatsProducer) Produce ¶
func (p *NatsProducer) Produce(data []byte) (err error)
Produce sends data to local message queue
func (*NatsProducer) Subject ¶
func (p *NatsProducer) Subject() string
Subject returns subject of local message queue
type NatsQueue ¶
NatsQueue wraps nats client as a message queue service
func (*NatsQueue) NewConsumer ¶
NewConsumer returns a new consumer for the message queue
func (*NatsQueue) NewProducer ¶
NewProducer returns a new producer for the message queue
type Producer ¶
Producer define the producer of message queue service
func NewProducer ¶
NewProducer returns a new producer of message queue service