amqp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 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 added in v1.0.0

func ExchangeType(t string) WriterOpt

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

func Passive added in v1.0.0

func Passive(p bool) WriterOpt

Passive makes logger not create exchanges

func RoutingFormat added in v1.0.0

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