queue

package
v0.0.0-...-bfbcaf2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 5 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