rabbitmq

package
v0.0.0-...-8c6d6a4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RabbitMQ

type RabbitMQ struct {
	ConnectionString string
	QueueName        string
	// contains filtered or unexported fields
}

func NewRabbitMQ

func NewRabbitMQ(config RabbitMQConfig) *RabbitMQ

NewRabbitMQ initializes the RabbitMQ struct with a predefined logger

func (*RabbitMQ) Close

func (r *RabbitMQ) Close() error

Close gracefully shuts down the connection and channel

func (*RabbitMQ) SendAlarm

func (r *RabbitMQ) SendAlarm(events model.Events) error

func (*RabbitMQ) Start

func (r *RabbitMQ) Start(ctx context.Context, wg *sync.WaitGroup)

Start the controller

type RabbitMQConfig

type RabbitMQConfig struct {
	ConnectionString string `yaml:"ConnectionString"`
	QueueName        string `yaml:"QueueName"`
	Scheme           string `yaml:"Scheme"`
	Host             string `yaml:"Host"`
	Port             int    `yaml:"Port"`
	UserName         string `yaml:"UserName"`
	Password         string `yaml:"Password"`
	Resource         string `yaml:"Resource"`
}

Jump to

Keyboard shortcuts

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