amqp

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

Writer implementation

func New

func New(url, exchange string, opts ...WriterOpt) (*Writer, error)

New creates a new writer

func (*Writer) Close

func (w *Writer) Close() (err error)

Close implements io.Closer interface

func (Writer) Write

func (w Writer) Write(m message.Message)

Write implements the logger.Writer interface

type WriterOpt

type WriterOpt func(*Writer) error

WriterOpt are options for the client

func ExchangeType

func ExchangeType(t string) WriterOpt

ExchangeType sets the exchange type from the default 'topic'.

func Passive

func Passive(p bool) WriterOpt

Passive makes logger not create exchanges

func RoutingFormat

func RoutingFormat(k string) WriterOpt

RoutingFormat sets the format for the routing key. Default is "{name}.{level}"

Jump to

Keyboard shortcuts

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