amqp

package
v1.4.21 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPulsarClient

func GetPulsarClient() pulsar.Client

GetPulsarClient 获取sms客户端

func GetRocketClient

func GetRocketClient() mq_http_sdk.MQClient

GetRocketClient 获取sms客户端

Types

type Pulsar

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

func NewPulsar

func NewPulsar(client pulsar.Client, appId, secretKey, addr, namespace string) *Pulsar

NewPulsar redis模式

func (*Pulsar) Close

func (m *Pulsar) Close()

Close 关闭连接

func (*Pulsar) InitProducer

func (m *Pulsar) InitProducer(queueName string) (pulsar.Producer, error)

func (*Pulsar) InitSubscribe

func (m *Pulsar) InitSubscribe(queueName, consumerName string) (pulsar.Consumer, error)

func (*Pulsar) PublishOnQueue

func (m *Pulsar) PublishOnQueue(queueName string, body string, tag string) error

PublishOnQueue 发布消息

func (*Pulsar) String

func (m *Pulsar) String() string

String 字符

func (*Pulsar) SubscribeToQueue

func (m *Pulsar) SubscribeToQueue(queueName string, consumerName string, tag string, handlerFunc message.AmqpConsumerFunc) error

type Rocket

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

func NewRocket

func NewRocket(client mq_http_sdk.MQClient, endpoint, accessKey, secretKey, instanceId, namespace string) *Rocket

NewRocket redis模式

func (*Rocket) Close

func (m *Rocket) Close()

Close 关闭连接

func (*Rocket) PublishOnQueue

func (m *Rocket) PublishOnQueue(queueName string, body string, tag string) error

PublishOnQueue 发布消息

func (*Rocket) String

func (m *Rocket) String() string

String 字符

func (*Rocket) SubscribeToQueue

func (m *Rocket) SubscribeToQueue(queueName string, consumerName string, tag string, handlerFunc message.AmqpConsumerFunc) error

Jump to

Keyboard shortcuts

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