queue

package
v0.0.0-...-4d6a655 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(connStr string, queueName string, logger *zap.Logger) (*client, error)

New creates a connection to a RMQ instance and configures the necessary queues

Types

type Message

type Message struct {
	ID int `json:"id"`
}

Message represents the structure of the messages being sent

type Queue

type Queue interface {
	Publish(msg *Message) error
	Consume(ctx context.Context) (<-chan *Message, error)
}

Queue is a interface to expose methods to interact with a queue

Jump to

Keyboard shortcuts

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