publisher

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Publisher)

func BindingKey

func BindingKey(bindingKey string) Option

func ExchangeName

func ExchangeName(exchangeName string) Option

func MessageTypeName

func MessageTypeName(messageTypeName string) Option

type Publisher

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

func NewPublisher

func NewPublisher(amqpConn *amqp.Connection, logger *log.Logger, opts ...Option) (*Publisher, error)

func (*Publisher) CloseChan

func (p *Publisher) CloseChan()

CloseChan Close messages chan.

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, body []byte, contentType string) error

Publish message.

Jump to

Keyboard shortcuts

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