queue

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

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	NewPublisher(queueName string) (Publisher, error)
	NewConsumer(queueName string, handler app.Handler) (Consumer, error)
	Close() error
}

func Connect

func Connect(queueType QueueType, url string) (Connection, error)

func NewRabbitMQConnection

func NewRabbitMQConnection(url string) (Connection, error)

func NewRedisConnection

func NewRedisConnection(url string) (Connection, error)

type Consumer

type Consumer interface {
	Consume()
	Stop()
}

type Publisher

type Publisher interface {
	Publish(ctx context.Context, message []byte) error
	Close() error
}

type QueueType

type QueueType string
const (
	RabbitMQ QueueType = "rabbitmq"
	Redis    QueueType = "redis"
)

Jump to

Keyboard shortcuts

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