utils

package
v0.0.0-...-12e68ab Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTooLarge    = 311
	NoRoute            = 312
	NoConsumers        = 313
	ConnectionForced   = 320
	InvalidPath        = 402
	AccessRefused      = 403
	NotFound           = 404
	ResourceLocked     = 405
	PreconditionFailed = 406
	FrameError         = 501
	SyntaxError        = 502
	CommandInvalid     = 503
	ChannelError       = 504
	UnexpectedFrame    = 505
	ResourceError      = 506
	NotAllowed         = 530
	NotImplemented     = 540
	InternalError      = 541
)

Error codes that can be sent from the server during a connection or channel exception or used by the client to indicate a class of error like ErrCredentials. The text of the error is likely more interesting than these constants.

Variables

This section is empty.

Functions

func ConvertOpt

func ConvertOpt(opt wabbit.Option) (amqp.Publishing, error)

Types

type ErrBroadcast

type ErrBroadcast struct {
	sync.Mutex // Protects listeners
	// contains filtered or unexported fields
}

ErrBroadcast enables broadcast an error channel to various listener channels

func NewErrBroadcast

func NewErrBroadcast() *ErrBroadcast

NewErrBroadcast creates a broadcast object for push errors to subscribed channels

func (*ErrBroadcast) Add

func (b *ErrBroadcast) Add(c chan<- wabbit.Error)

Add a new listener

func (*ErrBroadcast) Delete

func (b *ErrBroadcast) Delete(c chan<- wabbit.Error)

Delete the listener

func (*ErrBroadcast) Write

func (b *ErrBroadcast) Write(err wabbit.Error)

Write to subscribed channels

type Error

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

func NewError

func NewError(c int, r string, s bool, rc bool) *Error

func (Error) Code

func (e Error) Code() int

func (Error) Error

func (e Error) Error() string

func (Error) Reason

func (e Error) Reason() string

func (Error) Recover

func (e Error) Recover() bool

func (Error) Server

func (e Error) Server() bool

Jump to

Keyboard shortcuts

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