amqpclt

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

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

Publisher implements an amqp publisher.

func NewPublisher

func NewPublisher(conn *amqp.Connection, exchange string) (*Publisher, error)

func (*Publisher) Publish

func (p *Publisher) Publish(_ context.Context, car *base.CarEntity) error

Publish publishes a message.

type Subscriber

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

Subscriber implements an amqp subscriber.

func NewSubscriber

func NewSubscriber(conn *amqp.Connection, exchange string) (*Subscriber, error)

NewSubscriber creates an amqp subscriber.

func (*Subscriber) Subscribe

func (s *Subscriber) Subscribe(c context.Context) (chan *base.CarEntity, func(), error)

Subscribe subscribes and returns a channel with CarEntity data.

func (*Subscriber) SubscribeRaw

func (s *Subscriber) SubscribeRaw(_ context.Context) (<-chan amqp.Delivery, func(), error)

SubscribeRaw subscribes and returns a channel with raw amqp delivery.

Jump to

Keyboard shortcuts

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