taskqueue

package
v0.0.0-...-ba64992 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmqpMessage

type AmqpMessage struct {
	Delivery amqp.Delivery
}

func (*AmqpMessage) Body

func (m *AmqpMessage) Body() []byte

func (*AmqpMessage) Parse

func (m *AmqpMessage) Parse(jsonObj interface{}) error

type Broker

type Broker interface {
	Publish(body interface{}) error
	Consume(ctx context.Context) (chan Message, error)
	Ack(msg Message) error
	Nack(msg Message, requeue bool) error
}

type Client

type Client interface {
	health.Provider
	Broker(routingKey string) (Broker, error)
	Shutdown() error
}

func NewAmqpClient

func NewAmqpClient(url string, config amqp.Config, routingKeyPrefix string) Client

type Message

type Message interface {
	Body() []byte
	Parse(jsonObj interface{}) error
}

Jump to

Keyboard shortcuts

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