amqp

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 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 SetContentType

func SetContentType(ct string) WriterOpt

SetContentType sets the content type of messages. Default is "application/json"

func SetPassive

func SetPassive(p bool) WriterOpt

SetPassive makes logger not create exchanges

func SetRoutingFormat

func SetRoutingFormat(k string) WriterOpt

SetRoutingFormat 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