amqp

package
v0.0.0-...-72a54ad Latest Latest
Warning

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

Go to latest
Published: May 13, 2018 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccessRefused = 403

The client attempted to work with a server entity to which it has no access due to security settings.

View Source
var ChannelError = 504

The client attempted to work with a channel that had not been correctly opened. This most likely indicates a fault in the client layer.

View Source
var ClassIdBasic uint16 = 60
View Source
var ClassIdChannel uint16 = 20
View Source
var ClassIdConfirm uint16 = 85
View Source
var ClassIdConnection uint16 = 10
View Source
var ClassIdExchange uint16 = 40
View Source
var ClassIdQueue uint16 = 50
View Source
var ClassIdTx uint16 = 90
View Source
var CommandInvalid = 503

The client sent an invalid sequence of frames, attempting to perform an operation that was considered invalid by the server. This usually implies a programming error in the client.

View Source
var ConnectionForced = 320

An operator intervened to close the connection for some reason. The client may retry at some later date.

View Source
var ContentTooLarge = 311

The client attempted to transfer content larger than the server could accept at the present time. The client may retry at a later time.

View Source
var FrameBody = 3
View Source
var FrameEnd = 206
View Source
var FrameError = 501

The sender sent a malformed frame that the recipient could not decode. This strongly implies a programming error in the sending peer.

View Source
var FrameHeader = 2
View Source
var FrameHeartbeat = 8
View Source
var FrameMethod = 1
View Source
var FrameMinSize = 4096
View Source
var InternalError = 541

The server could not complete the method because of an internal error. The server may require intervention by an operator in order to resume normal operations.

View Source
var InvalidPath = 402

The client tried to work with an unknown virtual host.

View Source
var MaskAppId uint16 = 0x0008
View Source
var MaskContentEncoding uint16 = 0x4000
View Source
var MaskContentType uint16 = 0x8000
View Source
var MaskCorrelationId uint16 = 0x0400
View Source
var MaskDeliveryMode uint16 = 0x1000
View Source
var MaskExpiration uint16 = 0x0100
View Source
var MaskHeaders uint16 = 0x2000
View Source
var MaskMessageId uint16 = 0x0080
View Source
var MaskPriority uint16 = 0x0800
View Source
var MaskReplyTo uint16 = 0x0200
View Source
var MaskReserved uint16 = 0x0004
View Source
var MaskTimestamp uint16 = 0x0040
View Source
var MaskType uint16 = 0x0020
View Source
var MaskUserId uint16 = 0x0010
View Source
var MaxShortStringLength uint8 = 255
View Source
var MethodIdBasicAck uint16 = 80

************************ BasicAck ************************

View Source
var MethodIdBasicCancel uint16 = 30

************************ BasicCancel ************************

View Source
var MethodIdBasicCancelOk uint16 = 31

************************ BasicCancelOk ************************

View Source
var MethodIdBasicConsume uint16 = 20

************************ BasicConsume ************************

View Source
var MethodIdBasicConsumeOk uint16 = 21

************************ BasicConsumeOk ************************

View Source
var MethodIdBasicDeliver uint16 = 60

************************ BasicDeliver ************************

View Source
var MethodIdBasicGet uint16 = 70

************************ BasicGet ************************

View Source
var MethodIdBasicGetEmpty uint16 = 72

************************ BasicGetEmpty ************************

View Source
var MethodIdBasicGetOk uint16 = 71

************************ BasicGetOk ************************

View Source
var MethodIdBasicNack uint16 = 120

************************ BasicNack ************************

View Source
var MethodIdBasicPublish uint16 = 40

************************ BasicPublish ************************

View Source
var MethodIdBasicQos uint16 = 10

************************ BasicQos ************************

View Source
var MethodIdBasicQosOk uint16 = 11

************************ BasicQosOk ************************

View Source
var MethodIdBasicRecover uint16 = 110

************************ BasicRecover ************************

View Source
var MethodIdBasicRecoverAsync uint16 = 100

************************ BasicRecoverAsync ************************

View Source
var MethodIdBasicRecoverOk uint16 = 111

************************ BasicRecoverOk ************************

View Source
var MethodIdBasicReject uint16 = 90

************************ BasicReject ************************

View Source
var MethodIdBasicReturn uint16 = 50

************************ BasicReturn ************************

View Source
var MethodIdChannelClose uint16 = 40

************************ ChannelClose ************************

View Source
var MethodIdChannelCloseOk uint16 = 41

************************ ChannelCloseOk ************************

View Source
var MethodIdChannelFlow uint16 = 20

************************ ChannelFlow ************************

View Source
var MethodIdChannelFlowOk uint16 = 21

************************ ChannelFlowOk ************************

View Source
var MethodIdChannelOpen uint16 = 10

************************ ChannelOpen ************************

View Source
var MethodIdChannelOpenOk uint16 = 11

************************ ChannelOpenOk ************************

View Source
var MethodIdConfirmSelect uint16 = 10

************************ ConfirmSelect ************************

View Source
var MethodIdConfirmSelectOk uint16 = 11

************************ ConfirmSelectOk ************************

View Source
var MethodIdConnectionBlocked uint16 = 60

************************ ConnectionBlocked ************************

View Source
var MethodIdConnectionClose uint16 = 50

************************ ConnectionClose ************************

View Source
var MethodIdConnectionCloseOk uint16 = 51

************************ ConnectionCloseOk ************************

View Source
var MethodIdConnectionOpen uint16 = 40

************************ ConnectionOpen ************************

View Source
var MethodIdConnectionOpenOk uint16 = 41

************************ ConnectionOpenOk ************************

View Source
var MethodIdConnectionSecure uint16 = 20

************************ ConnectionSecure ************************

View Source
var MethodIdConnectionSecureOk uint16 = 21

************************ ConnectionSecureOk ************************

View Source
var MethodIdConnectionStart uint16 = 10

************************ ConnectionStart ************************

View Source
var MethodIdConnectionStartOk uint16 = 11

************************ ConnectionStartOk ************************

View Source
var MethodIdConnectionTune uint16 = 30

************************ ConnectionTune ************************

View Source
var MethodIdConnectionTuneOk uint16 = 31

************************ ConnectionTuneOk ************************

View Source
var MethodIdConnectionUnblocked uint16 = 61

************************ ConnectionUnblocked ************************

View Source
var MethodIdExchangeBind uint16 = 30

************************ ExchangeBind ************************

View Source
var MethodIdExchangeBindOk uint16 = 31

************************ ExchangeBindOk ************************

View Source
var MethodIdExchangeDeclare uint16 = 10

************************ ExchangeDeclare ************************

View Source
var MethodIdExchangeDeclareOk uint16 = 11

************************ ExchangeDeclareOk ************************

View Source
var MethodIdExchangeDelete uint16 = 20

************************ ExchangeDelete ************************

View Source
var MethodIdExchangeDeleteOk uint16 = 21

************************ ExchangeDeleteOk ************************

View Source
var MethodIdExchangeUnbind uint16 = 40

************************ ExchangeUnbind ************************

View Source
var MethodIdExchangeUnbindOk uint16 = 51

************************ ExchangeUnbindOk ************************

View Source
var MethodIdQueueBind uint16 = 20

************************ QueueBind ************************

View Source
var MethodIdQueueBindOk uint16 = 21

************************ QueueBindOk ************************

View Source
var MethodIdQueueDeclare uint16 = 10

************************ QueueDeclare ************************

View Source
var MethodIdQueueDeclareOk uint16 = 11

************************ QueueDeclareOk ************************

View Source
var MethodIdQueueDelete uint16 = 40

************************ QueueDelete ************************

View Source
var MethodIdQueueDeleteOk uint16 = 41

************************ QueueDeleteOk ************************

View Source
var MethodIdQueuePurge uint16 = 30

************************ QueuePurge ************************

View Source
var MethodIdQueuePurgeOk uint16 = 31

************************ QueuePurgeOk ************************

View Source
var MethodIdQueueUnbind uint16 = 50

************************ QueueUnbind ************************

View Source
var MethodIdQueueUnbindOk uint16 = 51

************************ QueueUnbindOk ************************

View Source
var MethodIdTxCommit uint16 = 20

************************ TxCommit ************************

View Source
var MethodIdTxCommitOk uint16 = 21

************************ TxCommitOk ************************

View Source
var MethodIdTxRollback uint16 = 30

************************ TxRollback ************************

View Source
var MethodIdTxRollbackOk uint16 = 31

************************ TxRollbackOk ************************

View Source
var MethodIdTxSelect uint16 = 10

************************ TxSelect ************************

View Source
var MethodIdTxSelectOk uint16 = 11

************************ TxSelectOk ************************

View Source
var NoConsumers = 313

When the exchange cannot deliver to a consumer when the immediate flag is set. As a result of pending data on the queue or the absence of any consumers of the queue.

View Source
var NotAllowed = 530

The client tried to work with some entity in a manner that is prohibited by the server, due to security settings or by some other criteria.

View Source
var NotFound = 404

The client attempted to work with a server entity that does not exist.

View Source
var NotImplemented = 540

The client tried to use functionality that is not implemented in the server.

View Source
var PreconditionFailed = 406

The client requested a method that was not allowed because some precondition failed.

View Source
var ReadClassId = ReadShort
View Source
var ReadConsumerTag = ReadShortstr
View Source
var ReadDeliveryTag = ReadLonglong
View Source
var ReadExchangeName = ReadShortstr
View Source
var ReadMessageCount = ReadLong
View Source
var ReadMethodId = ReadShort
View Source
var ReadPath = ReadShortstr
View Source
var ReadPeerProperties = ReadTable
View Source
var ReadQueueName = ReadShortstr
View Source
var ReadReplyCode = ReadShort
View Source
var ReadReplyText = ReadShortstr
View Source
var ReplySuccess = 200

Indicates that the method completed successfully. This reply code is reserved for future use - the current protocol design does not use positive confirmation and reply codes are sent only in case of an error.

View Source
var ResourceError = 506

The server could not complete the method because it lacked sufficient resources. This may be due to the client creating too many of some type of entity.

View Source
var ResourceLocked = 405

The client attempted to work with a server entity to which it has no access because another client is working with it.

View Source
var SyntaxError = 502

The sender sent a frame that contained illegal values for one or more fields. This strongly implies a programming error in the sending peer.

View Source
var UnexpectedFrame = 505

The peer sent a frame that was not expected, usually in the context of a content header and body. This strongly indicates a fault in the peer's content processing.

View Source
var WriteClassId = WriteShort
View Source
var WriteConsumerTag = WriteShortstr
View Source
var WriteDeliveryTag = WriteLonglong
View Source
var WriteExchangeName = WriteShortstr
View Source
var WriteMessageCount = WriteLong
View Source
var WriteMethodId = WriteShort
View Source
var WritePath = WriteShortstr
View Source
var WritePeerProperties = WriteTable
View Source
var WriteQueueName = WriteShortstr
View Source
var WriteReplyCode = WriteShort
View Source
var WriteReplyText = WriteShortstr

Functions

func CheckExchangeOrQueueName

func CheckExchangeOrQueueName(s string) error

func EquivalentTables

func EquivalentTables(t1 *Table, t2 *Table) bool

func ReadLong

func ReadLong(buf io.Reader) (data uint32, err error)

func ReadLonglong

func ReadLonglong(buf io.Reader) (data uint64, err error)

func ReadLongstr

func ReadLongstr(buf io.Reader) ([]byte, error)

func ReadOctet

func ReadOctet(buf io.Reader) (data byte, err error)

func ReadShort

func ReadShort(buf io.Reader) (data uint16, err error)

func ReadShortstr

func ReadShortstr(buf io.Reader) (string, error)

func ReadTimestamp

func ReadTimestamp(buf io.Reader) (uint64, error)

Can't get coverage on this easily since I can't currently generate timestamp values in Tables because protobuf doesn't give me a type that is different from uint64

func WriteFrame

func WriteFrame(buf io.Writer, frame *WireFrame)

func WriteFrameEnd

func WriteFrameEnd(buf io.Writer) error

func WriteLong

func WriteLong(buf io.Writer, i uint32) error

func WriteLonglong

func WriteLonglong(buf io.Writer, i uint64) error

func WriteLongstr

func WriteLongstr(buf io.Writer, bytes []byte) (err error)

func WriteOctet

func WriteOctet(buf io.Writer, b byte) error

func WriteProtocolHeader

func WriteProtocolHeader(buf io.Writer) error

func WriteShort

func WriteShort(buf io.Writer, i uint16) error

func WriteShortstr

func WriteShortstr(buf io.Writer, s string) error

func WriteStringChar

func WriteStringChar(buf io.Writer, b byte) error

func WriteTable

func WriteTable(writer io.Writer, table *Table) error

func WriteTimestamp

func WriteTimestamp(buf io.Writer, timestamp uint64) error

func WriteVersion

func WriteVersion(buf io.Writer) error

Types

type AMQPError

type AMQPError struct {
	Code   uint16
	Class  uint16
	Method uint16
	Msg    string
	Soft   bool
}

func NewHardError

func NewHardError(code uint16, msg string, class uint16, method uint16) *AMQPError

func NewSoftError

func NewSoftError(code uint16, msg string, class uint16, method uint16) *AMQPError

type Frame

type Frame interface {
	FrameType() byte
}

type MessageResourceHolder

type MessageResourceHolder interface {
	AcquireResources(qm *QueueMessage) bool
	ReleaseResources(qm *QueueMessage)
}

A message resource is something which has limits on the count of messages it can handle as well as the cumulative size of the messages it can handle.

type MethodFrame

type MethodFrame interface {
	MethodName() string
	MethodIdentifier() (uint16, uint16)
	Read(reader io.Reader, strictMode bool) (err error)
	Write(writer io.Writer) (err error)
	FrameType() byte
}

func ReadMethod

func ReadMethod(reader io.Reader, strictMode bool) (MethodFrame, error)

Jump to

Keyboard shortcuts

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