common

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MPL-2.0 Imports: 6 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 {
	// contains filtered or unexported fields
}

AMQPConnector ...

func NewAMQPConnector added in v1.0.4

func NewAMQPConnector(url string, tlsConfig *tls.Config, opts ...AMQPConnectorOption) *AMQPConnector

func (*AMQPConnector) Channel added in v1.0.4

func (ac *AMQPConnector) Channel() (*amqp.Channel, error)

func (*AMQPConnector) DeleteQueue

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

DeleteQueue deletes a queue by name

func (*AMQPConnector) ErrChan added in v1.0.4

func (ac *AMQPConnector) ErrChan() chan error

func (*AMQPConnector) Exchange added in v1.0.4

func (ac *AMQPConnector) Exchange(exchange, exchangeType, queueName string, queueDurable, queueDelete bool, queueBindingKey string, exchangeDeclareArgs, queueDeclareArgs, queueBindingArgs amqp.Table) (*amqp.Channel, amqp.Queue, <-chan amqp.Confirmation, error)

Exchange declares an exchange, opens a channel declares and binds the queue and enables publish notifications using the existing RabbitMQ connection.

func (*AMQPConnector) InspectQueue

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

InspectQueue provides information about a specific queue

type AMQPConnectorOption added in v1.0.4

type AMQPConnectorOption func(c *AMQPConnector)

func WithAMQPConnectionMaxRetries added in v1.0.4

func WithAMQPConnectionMaxRetries(retries int) AMQPConnectorOption

func WithAMQPConnectionRetryTimeout added in v1.0.4

func WithAMQPConnectionRetryTimeout(timeout time.Duration) AMQPConnectorOption

func WithAMQPExchangeMaxRetries added in v1.0.4

func WithAMQPExchangeMaxRetries(retries int) AMQPConnectorOption

func WithAMQPExchangeRetryTimeout added in v1.0.4

func WithAMQPExchangeRetryTimeout(timeout time.Duration) AMQPConnectorOption

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