Documentation ¶
Index ¶
- func RegQueueCreator(typeName string, creator QueueCreatorFunc)
- type NatsQueueClient
- func (o *NatsQueueClient) Consume(name string, consumer QueueConsumerFunc)
- func (o *NatsQueueClient) ConsumeRaw(name string, consumer QueueRawConsumerFunc)
- func (o *NatsQueueClient) Publish(name string, msg interface{}) error
- func (o *NatsQueueClient) PublishRaw(name string, msg []byte) error
- func (o *NatsQueueClient) Reply(subject string, eventHandler QueueReqHandler)
- func (o *NatsQueueClient) ReplyRaw(subject string, eventHandler QueueRawReqHandler)
- func (o *NatsQueueClient) Request(subject string, msg interface{}, timeOut ...time.Duration) (string, error)
- func (o *NatsQueueClient) RequestRaw(subject string, msg []byte, timeOut ...time.Duration) ([]byte, error)
- type QueueClient
- type QueueConsumerFunc
- type QueueCreatorFunc
- type QueueRawConsumerFunc
- type QueueRawReqHandler
- type QueueReqHandler
- type RedisQueue
- func (o *RedisQueue) Consume(name string, consumer QueueConsumerFunc)
- func (o *RedisQueue) ConsumeRaw(name string, consumer QueueRawConsumerFunc)
- func (o *RedisQueue) Publish(name string, payload interface{}) error
- func (o *RedisQueue) PublishRaw(name string, payload []byte) error
- func (o *RedisQueue) Reply(subject string, eventHandler QueueReqHandler)
- func (o *RedisQueue) ReplyRaw(subject string, eventHandler QueueRawReqHandler)
- func (o *RedisQueue) Request(subject string, msg interface{}, timeOut ...time.Duration) (string, error)
- func (o *RedisQueue) RequestRaw(subject string, msg []byte, timeOut ...time.Duration) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegQueueCreator ¶
func RegQueueCreator(typeName string, creator QueueCreatorFunc)
Types ¶
type NatsQueueClient ¶ added in v0.1.15
type NatsQueueClient struct {
// contains filtered or unexported fields
}
func (*NatsQueueClient) Consume ¶ added in v0.1.15
func (o *NatsQueueClient) Consume(name string, consumer QueueConsumerFunc)
func (*NatsQueueClient) ConsumeRaw ¶ added in v0.1.22
func (o *NatsQueueClient) ConsumeRaw(name string, consumer QueueRawConsumerFunc)
func (*NatsQueueClient) Publish ¶ added in v0.1.15
func (o *NatsQueueClient) Publish(name string, msg interface{}) error
func (*NatsQueueClient) PublishRaw ¶ added in v0.1.22
func (o *NatsQueueClient) PublishRaw(name string, msg []byte) error
func (*NatsQueueClient) Reply ¶ added in v0.1.22
func (o *NatsQueueClient) Reply(subject string, eventHandler QueueReqHandler)
func (*NatsQueueClient) ReplyRaw ¶ added in v0.1.22
func (o *NatsQueueClient) ReplyRaw(subject string, eventHandler QueueRawReqHandler)
func (*NatsQueueClient) RequestRaw ¶ added in v0.1.22
type QueueClient ¶
type QueueClient interface { Publish(name string, msg interface{}) error PublishRaw(name string, msg []byte) error Consume(name string, consumer QueueConsumerFunc) ConsumeRaw(name string, consumer QueueRawConsumerFunc) Request(subject string, msg interface{}, timeOut ...time.Duration) (string, error) RequestRaw(subject string, msg []byte, timeOut ...time.Duration) ([]byte, error) Reply(subject string, eventHandler QueueReqHandler) ReplyRaw(subject string, eventHandler QueueRawReqHandler) }
func Get ¶
func Get(name ...string) QueueClient
type QueueConsumerFunc ¶
type QueueConsumerFunc func(name, msg string)
type QueueCreatorFunc ¶
type QueueCreatorFunc func(url string) (QueueClient, error)
type QueueRawConsumerFunc ¶ added in v0.1.22
type QueueRawReqHandler ¶ added in v0.1.22
type QueueReqHandler ¶ added in v0.1.22
type RedisQueue ¶
type RedisQueue struct {
// contains filtered or unexported fields
}
func (*RedisQueue) Consume ¶
func (o *RedisQueue) Consume(name string, consumer QueueConsumerFunc)
func (*RedisQueue) ConsumeRaw ¶ added in v0.1.22
func (o *RedisQueue) ConsumeRaw(name string, consumer QueueRawConsumerFunc)
func (*RedisQueue) Publish ¶
func (o *RedisQueue) Publish(name string, payload interface{}) error
func (*RedisQueue) PublishRaw ¶ added in v0.1.22
func (o *RedisQueue) PublishRaw(name string, payload []byte) error
func (*RedisQueue) Reply ¶ added in v0.1.22
func (o *RedisQueue) Reply(subject string, eventHandler QueueReqHandler)
func (*RedisQueue) ReplyRaw ¶ added in v0.1.22
func (o *RedisQueue) ReplyRaw(subject string, eventHandler QueueRawReqHandler)
func (*RedisQueue) RequestRaw ¶ added in v0.1.22
Click to show internal directories.
Click to hide internal directories.