queue

package module
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQPClient

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

func NewAMQPClient

func NewAMQPClient(broker, username, password string) (*AMQPClient, error)

func (*AMQPClient) Disconnect

func (a *AMQPClient) Disconnect()

func (*AMQPClient) Publish

func (a *AMQPClient) Publish(topic string, message string, header ...Header) error

type ActiveMQApi

type ActiveMQApi interface {
	Publish(topic, message string, header ...Header) error
	Disconnect()
}
type Header struct {
	Key   string
	Value string
}

type MQTTClient

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

func NewMQTTClient

func NewMQTTClient(broker, username, password string) (*MQTTClient, error)

func (*MQTTClient) Disconnect

func (m *MQTTClient) Disconnect()

func (*MQTTClient) Publish

func (m *MQTTClient) Publish(topic, message string, header ...Header) error

type MockActiveMQApi

type MockActiveMQApi struct {
	mock.Mock
}

MockActiveMQApi is an autogenerated mock type for the ActiveMQApi type

func NewMockActiveMQApi added in v0.2.3

func NewMockActiveMQApi(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockActiveMQApi

NewMockActiveMQApi creates a new instance of MockActiveMQApi. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockActiveMQApi) Disconnect

func (_m *MockActiveMQApi) Disconnect()

Disconnect provides a mock function with given fields:

func (*MockActiveMQApi) Publish

func (_m *MockActiveMQApi) Publish(topic string, message string) error

Publish provides a mock function with given fields: topic, message

type StompClient

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

func NewStompClient

func NewStompClient(broker, username, password string) *StompClient

func (*StompClient) Connect added in v0.2.3

func (s *StompClient) Connect() error

Connect connets client to broker

func (*StompClient) Disconnect

func (s *StompClient) Disconnect()

Disconnect closes connection to broker

func (*StompClient) Publish

func (s *StompClient) Publish(destination string, msg string, header ...Header) error

Publish pulishes message to queue. Will reconnect if connection is already closed

Jump to

Keyboard shortcuts

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