common

package
v1.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2017 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQPConnector

type AMQPConnector struct{}

AMQPConnector ...

func (*AMQPConnector) Close

func (ac *AMQPConnector) Close(channel *amqp.Channel, conn *amqp.Connection) error

Close connection

func (*AMQPConnector) Connect

func (ac *AMQPConnector) Connect(url string, tlsConfig *tls.Config, exchange, exchangeType, queueName string, queueDurable, queueDelete bool, queueBindingKey string, exchangeDeclareArgs, queueDeclareArgs, queueBindingArgs amqp.Table) (*amqp.Connection, *amqp.Channel, amqp.Queue, <-chan amqp.Confirmation, <-chan *amqp.Error, error)

Connect opens a connection to RabbitMQ, declares an exchange, opens a channel, declares and binds the queue and enables publish notifications

func (*AMQPConnector) DeleteQueue

func (ac *AMQPConnector) DeleteQueue(channel *amqp.Channel, queueName string) error

DeleteQueue deletes a queue by name

func (*AMQPConnector) InspectQueue

func (*AMQPConnector) InspectQueue(channel *amqp.Channel, queueName string) (*amqp.Queue, error)

InspectQueue provides information about a specific queue

func (*AMQPConnector) Open

func (ac *AMQPConnector) Open(url string, tlsConfig *tls.Config) (*amqp.Connection, *amqp.Channel, error)

Open new RabbitMQ connection

type RedisConnector

type RedisConnector struct{}

RedisConnector ...

func (*RedisConnector) NewPool

func (rc *RedisConnector) NewPool(socketPath, host, password string, db int) *redis.Pool

NewPool returns a new pool of Redis connections

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL