queue

package
v0.0.0-...-2d7de26 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQClient

type MQClient interface {
	Close()
	Publish(id string, msg any, priority uint8) error
}

type MockRabbitMQClient

type MockRabbitMQClient struct {
	PublishFunc func(id string, msg any, priority uint8) error
}

func (*MockRabbitMQClient) Close

func (m *MockRabbitMQClient) Close()

func (*MockRabbitMQClient) Publish

func (m *MockRabbitMQClient) Publish(id string, msg any, priority uint8) error

type RabbitMQClient

type RabbitMQClient struct {
	Ctx     context.Context
	Channel *amqp.Channel
	Queue   string
	// contains filtered or unexported fields
}

func NewRabbitMQClient

func NewRabbitMQClient(ctx context.Context, connUrl string) (*RabbitMQClient, error)

Create new RabbitMQ amqp client, using amqp:// connection string

func (*RabbitMQClient) Close

func (c *RabbitMQClient) Close()

func (*RabbitMQClient) Publish

func (c *RabbitMQClient) Publish(id string, msg any, priority uint8) error

func (*RabbitMQClient) Reconnect

func (c *RabbitMQClient) Reconnect() error

Reconnect reconnects the connection

Jump to

Keyboard shortcuts

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