mqserver

package
v0.0.0-...-412d469 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQServer

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

MQServer provides a wrapper over the message queue.

func NewMQServer

func NewMQServer(
	inboundMQAddr string,
	inboundChName string,
	outboundMQAddr string,
	outboundChName string,
	handlers map[string]map[string]func(msg messages.Message),
) (*MQServer, error)

NewMQServer creates a new message queue server. inboundMQAddr is the address of the inbound MQ this server listens from. inboundChName is the channel name of inbound MQ. outboundMQAddr is the address of the outbound MQ this server pushes to. outboundChName is the channel name of the outbound MQ. handlers are handlers for different messages depending on the message version & message type.

func (*MQServer) Request

func (s *MQServer) Request(version string, msgType string, msg messages.Message)

Request sends a message to the message queue.

func (*MQServer) Shutdown

func (s *MQServer) Shutdown()

Shutdown shuts down the server.

func (*MQServer) Start

func (s *MQServer) Start()

Start starts the message handling routine.

type MessageQueue

type MessageQueue interface {
	// Request sends a message to the message queue.
	Request(version string, msgType string, msg messages.Message)

	// Start starts the message handling routine.
	Start()
}

Jump to

Keyboard shortcuts

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