publisher

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClosePublisher

func ClosePublisher(publisher Publisher, log logger.Logger)

Types

type Publisher

type Publisher interface {
	io.Closer
	Publish(
		data []byte,
		routingKeys []string,
		optionFuncs ...func(*rabbitmq.PublishOptions),
	) error
}

Publisher is just an interface for the library publisher which doesn't have one.

func NewPublisher

func NewPublisher(conf config.QueueConfig, log logger.Logger) (Publisher, error)

NewPublisher creates a publisher and connects to the rabbit under the hood. This method appears to be not testable cause it combines 2 responsibilities: create an instance and connect to a queue. I think we may rely on NewPublisher has been already tested in the library.

Directories

Path Synopsis
Package publisher is a generated GoMock package.
Package publisher is a generated GoMock package.

Jump to

Keyboard shortcuts

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