Documentation ¶
Overview ¶
Package amqputils is a library for creating easily client and a amqp servers
Index ¶
- Variables
- func Call(url, queueName string, info []byte, poolSize int) ([]byte, error)
- func CallWithConn(ch *amqp.Channel, queueName string, info []byte, poolSize int) ([]byte, error)
- func CallWithConnAsync(ch *amqp.Channel, queueName string, info []byte, resp chan []byte, ...) error
- func CreateChannelConnection(url string) (*amqp.Channel, func(), error)
- func CreateConnection(url string) (*amqp.Connection, *amqp.Channel, func(), error)
- func CreateQueue(ch *amqp.Channel, queueName string) (*amqp.Queue, error)
- func CreateQueueNotDurable(ch *amqp.Channel, queueName string) (*amqp.Queue, error)
- func Publish(url, queueName string, info []byte) error
- func PublishWithConn(ch *amqp.Channel, queueName string, info []byte) error
- func Subscribe(ch *amqp.Channel, q *amqp.Queue, do SubscribeFunc, poolConSize int) error
- type Server
- type SubscribeFunc
- type TunnyExecutor
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = errors.New("timeout error")
ErrTimeout error
Functions ¶
func CallWithConn ¶
CallWithConn a queue and receives the response
func CallWithConnAsync ¶
func CallWithConnAsync(ch *amqp.Channel, queueName string, info []byte, resp chan []byte, poolSize int) error
CallWithConnAsync a queue and receives the response in a channel
func CreateChannelConnection ¶
CreateChannelConnection channel and its respective close function
func CreateConnection ¶
CreateConnection connection - channel and its respective close function
func CreateQueue ¶
CreateQueue in the amqp server
func CreateQueueNotDurable ¶
CreateQueueNotDurable in the amqp server not durable
func PublishWithConn ¶
PublishWithConn in a queue
Types ¶
type Server ¶
type Server struct { Event string Do SubscribeFunc AMQPChan *amqp.Channel AMQPQueue *amqp.Queue PoolSize int }
Server for receiving amqp messages
func HealtCheck ¶
HealtCheck send a response each time that receive a message
type SubscribeFunc ¶
SubscribeFunc function to handle an incoming message
type TunnyExecutor ¶ added in v1.5.0
type TunnyExecutor struct { Do SubscribeFunc AMQPChan *amqp.Channel Delivery amqp.Delivery }
TunnyExecutor pool args
Click to show internal directories.
Click to hide internal directories.