gormqio

package module
v0.0.0-...-44acb53 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectConfig

type ConnectConfig struct {
	Login, Password, Ip, Port, QueueTitle, ExchangeTitle, ExchangeType, RoutingKey, ConsumerTitle string
	Durable, AutoDelete, Exclusive, NoWait, Internal, Mandatory, Immediate, AutoAck, NoLocal      bool
	Args                                                                                          amqp.Table
}

type OperationCallback

type OperationCallback func(*Worker, amqp091.Delivery)

type RmqService

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

func Init

func Init(config *ConnectConfig) *RmqService

func (*RmqService) Consume

func (r *RmqService) Consume(ctx context.Context, qName string) (<-chan amqp.Delivery, error)

func (*RmqService) GetConfig

func (r *RmqService) GetConfig() *ConnectConfig

func (*RmqService) Publish

func (r *RmqService) Publish(message []byte) bool

type SenderWorker

type SenderWorker struct {
	*Worker
}

func GetSender

func GetSender(worker *Worker) *SenderWorker

func (*SenderWorker) GetHandle

func (senderWorker *SenderWorker) GetHandle() OperationCallback

type Worker

type Worker struct {
	QueueTitle string
	Rmq        *RmqService
}

func (*Worker) Run

func (worker *Worker) Run(callback func(worker *Worker, msg amqp091.Delivery))

Jump to

Keyboard shortcuts

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