brokers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: GPL-3.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 BrokerInterface

type BrokerInterface interface {
	Next(queryName string) (message.Message, error)
	Send(queryName string, msg message.Message) error
	// 调用Activate后才真正建立连接
	Activate()
	SetPoolSize(int)
	GetPoolSize() int
}

type RabbitMqBroker

type RabbitMqBroker struct {
	// contains filtered or unexported fields
}

func NewRabbitMqBroker

func NewRabbitMqBroker(host, port, user, password string) RabbitMqBroker

func (*RabbitMqBroker) Activate

func (r *RabbitMqBroker) Activate()

func (*RabbitMqBroker) GetPoolSize

func (r *RabbitMqBroker) GetPoolSize() int

func (*RabbitMqBroker) Next

func (r *RabbitMqBroker) Next(queryName string) (message.Message, error)

func (*RabbitMqBroker) Send

func (r *RabbitMqBroker) Send(queryName string, msg message.Message) error

func (*RabbitMqBroker) SetPoolSize

func (r *RabbitMqBroker) SetPoolSize(n int)

type RedisBroker

type RedisBroker struct {
	// contains filtered or unexported fields
}

func NewRedisBroker

func NewRedisBroker(host string, port string, password string, db int, poolSize int) RedisBroker

func (*RedisBroker) Activate

func (r *RedisBroker) Activate()

func (*RedisBroker) GetPoolSize

func (r *RedisBroker) GetPoolSize() int

func (*RedisBroker) Next

func (r *RedisBroker) Next(queryName string) (message.Message, error)

func (*RedisBroker) Send

func (r *RedisBroker) Send(queryName string, msg message.Message) error

func (*RedisBroker) SetPoolSize

func (r *RedisBroker) SetPoolSize(n int)

Jump to

Keyboard shortcuts

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