mockmq

package
v0.0.0-...-7a3883e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Hosts        string
	Partition    int
	PrivateTopic string
	GroupID      string
}

Config mock mq 配置参数.

type MockMQ

type MockMQ struct {
	Name string
	// contains filtered or unexported fields
}

MockMQ for test when programing

func GetMockMQ

func GetMockMQ(mqConnName string) (*MockMQ, error)

GetMockMQ 获取MockMQ.

func InitMockMQ

func InitMockMQ(mqConnName string, connCfg *mqenv.MQConnectorConfig, mqCfg *Config) (*MockMQ, error)

InitMockMQ init

func (*MockMQ) Send

func (worker *MockMQ) Send(topic string, pm *mqenv.MQPublishMessage, withReply bool) (*mqenv.MQConsumerMessage, error)

Send 发送信息.

func (*MockMQ) Subscribe

func (worker *MockMQ) Subscribe(topic string, consumeProxy *mqenv.MQConsumerProxy)

Subscribe 订阅topic.

Jump to

Keyboard shortcuts

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