rabbit

package
v1.0.2233-51b0b76 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package rabbit contains an experimental RabbitMQ publishing client.

Index

Constants

View Source
const JSON = "application/json; charset=utf-8"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL            secret.String
	ConnectionName string
	QueueName      string
}

type PublisherPool

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

func Load

func Load(ctx context.Context, cfg Config, sys *system.System) (*PublisherPool, error)

func NewPublisherPool

func NewPublisherPool(ctx context.Context, name string, dialer *amqpextra.Dialer,
	opts ...publisher.Option) *PublisherPool

func (*PublisherPool) Close

func (p *PublisherPool) Close(ctx context.Context) (err error)

func (*PublisherPool) Gauges

func (p *PublisherPool) Gauges(_ context.Context) map[string]float64

func (*PublisherPool) MetricName

func (p *PublisherPool) MetricName() string

func (*PublisherPool) Publish

func (p *PublisherPool) Publish(ctx context.Context, msg publisher.Message) (err error)

func (*PublisherPool) PublishJSON

func (p *PublisherPool) PublishJSON(ctx context.Context, msg publisher.Message, v interface{}) (err error)

Jump to

Keyboard shortcuts

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