brokers

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerInterface

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

type RabbitMqBroker added in v2.1.4

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

func NewRabbitMqBroker added in v2.1.4

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

func (*RabbitMqBroker) Activate added in v2.1.4

func (r *RabbitMqBroker) Activate()

func (RabbitMqBroker) Clone added in v2.2.0

func (r RabbitMqBroker) Clone() BrokerInterface

func (*RabbitMqBroker) GetPoolSize added in v2.1.4

func (r *RabbitMqBroker) GetPoolSize() int

func (*RabbitMqBroker) LSend added in v2.2.0

func (r *RabbitMqBroker) LSend(queueName string, msg message.Message) error

func (*RabbitMqBroker) Next added in v2.1.4

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

func (*RabbitMqBroker) Send added in v2.1.4

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

func (*RabbitMqBroker) SetPoolSize added in v2.1.4

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) Clone added in v2.2.0

func (r RedisBroker) Clone() BrokerInterface

func (*RedisBroker) GetPoolSize

func (r *RedisBroker) GetPoolSize() int

func (*RedisBroker) LSend added in v2.2.0

func (r *RedisBroker) LSend(queueName string, msg message.Message) error

func (*RedisBroker) Next

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

func (*RedisBroker) Send

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

func (*RedisBroker) SetPoolSize

func (r *RedisBroker) SetPoolSize(n int)

type RocketMqBroker added in v2.3.0

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

func NewRocketMqBroker added in v2.3.0

func NewRocketMqBroker(namesrvAddr []string, brokerAddr ...[]string) RocketMqBroker

func (*RocketMqBroker) Activate added in v2.3.0

func (r *RocketMqBroker) Activate()

func (RocketMqBroker) Clone added in v2.3.0

func (r RocketMqBroker) Clone() BrokerInterface

func (*RocketMqBroker) GetPoolSize added in v2.3.0

func (r *RocketMqBroker) GetPoolSize() int

func (*RocketMqBroker) LSend added in v2.3.0

func (r *RocketMqBroker) LSend(queueName string, msg message.Message) error

func (*RocketMqBroker) Next added in v2.3.0

func (r *RocketMqBroker) Next(topic string) (message.Message, error)

func (*RocketMqBroker) Send added in v2.3.0

func (r *RocketMqBroker) Send(topic string, msg message.Message) error

func (*RocketMqBroker) SetPoolSize added in v2.3.0

func (r *RocketMqBroker) SetPoolSize(n int)

func (RocketMqBroker) Shutdown added in v2.3.0

func (r RocketMqBroker) Shutdown()

目前不做使用

Jump to

Keyboard shortcuts

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