amqp

package
v0.0.0-...-becd122 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package amqp for read, write, parse amqp frames Autogenerated code. Do not edit.

Package amqp for read, write, parse amqp frames Autogenerated code. Do not edit.

Index

Constants

View Source
const (
	Proto091    = "amqp-0-9-1"
	ProtoRabbit = "amqp-rabbit"
)

supported protocol identifiers

View Source
const (
	ErrorOnConnection = iota
	ErrorOnChannel
)

Constants to detect connection or channel error thrown

View Source
const AccessRefused = 403

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

View Source
const ChannelError = 504

ChannelError identifier 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
const ClassBasic = 60

ClassBasic identifier

View Source
const ClassChannel = 20

ClassChannel identifier

View Source
const ClassConfirm = 85

ClassConfirm identifier

View Source
const ClassConnection = 10

ClassConnection identifier

View Source
const ClassExchange = 40

ClassExchange identifier

View Source
const ClassQueue = 50

ClassQueue identifier

View Source
const ClassTx = 90

ClassTx identifier

View Source
const CommandInvalid = 503

CommandInvalid identifier 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
const ConnectionForced = 320

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

View Source
const ContentTooLarge = 311

ContentTooLarge identifier 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
const FrameBody = 3

FrameBody identifier

View Source
const FrameEnd = 206

FrameEnd identifier

View Source
const FrameError = 501

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

View Source
const FrameHeader = 2

FrameHeader identifier

View Source
const FrameHeartbeat = 8

FrameHeartbeat identifier

View Source
const FrameMethod = 1

FrameMethod identifier

View Source
const FrameMinSize = 4096

FrameMinSize identifier

View Source
const InternalError = 541

InternalError identifier 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
const InvalidPath = 402

InvalidPath identifier The client tried to work with an unknown virtual host.

View Source
const MethodBasicAck = 80

MethodBasicAck identifier

View Source
const MethodBasicCancel = 30

MethodBasicCancel identifier

View Source
const MethodBasicCancelOk = 31

MethodBasicCancelOk identifier

View Source
const MethodBasicConsume = 20

MethodBasicConsume identifier

View Source
const MethodBasicConsumeOk = 21

MethodBasicConsumeOk identifier

View Source
const MethodBasicDeliver = 60

MethodBasicDeliver identifier

View Source
const MethodBasicGet = 70

MethodBasicGet identifier

View Source
const MethodBasicGetEmpty = 72

MethodBasicGetEmpty identifier

View Source
const MethodBasicGetOk = 71

MethodBasicGetOk identifier

View Source
const MethodBasicNack = 120

MethodBasicNack identifier

View Source
const MethodBasicPublish = 40

MethodBasicPublish identifier

View Source
const MethodBasicQos = 10

MethodBasicQos identifier

View Source
const MethodBasicQosOk = 11

MethodBasicQosOk identifier

View Source
const MethodBasicRecover = 110

MethodBasicRecover identifier

View Source
const MethodBasicRecoverAsync = 100

MethodBasicRecoverAsync identifier

View Source
const MethodBasicRecoverOk = 111

MethodBasicRecoverOk identifier

View Source
const MethodBasicReject = 90

MethodBasicReject identifier

View Source
const MethodBasicReturn = 50

MethodBasicReturn identifier

View Source
const MethodChannelClose = 40

MethodChannelClose identifier

View Source
const MethodChannelCloseOk = 41

MethodChannelCloseOk identifier

View Source
const MethodChannelFlow = 20

MethodChannelFlow identifier

View Source
const MethodChannelFlowOk = 21

MethodChannelFlowOk identifier

View Source
const MethodChannelOpen = 10

MethodChannelOpen identifier

View Source
const MethodChannelOpenOk = 11

MethodChannelOpenOk identifier

View Source
const MethodConfirmSelect = 10

MethodConfirmSelect identifier

View Source
const MethodConfirmSelectOk = 11

MethodConfirmSelectOk identifier

View Source
const MethodConnectionBlocked = 60

MethodConnectionBlocked identifier

View Source
const MethodConnectionClose = 50

MethodConnectionClose identifier

View Source
const MethodConnectionCloseOk = 51

MethodConnectionCloseOk identifier

View Source
const MethodConnectionOpen = 40

MethodConnectionOpen identifier

View Source
const MethodConnectionOpenOk = 41

MethodConnectionOpenOk identifier

View Source
const MethodConnectionSecure = 20

MethodConnectionSecure identifier

View Source
const MethodConnectionSecureOk = 21

MethodConnectionSecureOk identifier

View Source
const MethodConnectionStart = 10

MethodConnectionStart identifier

View Source
const MethodConnectionStartOk = 11

MethodConnectionStartOk identifier

View Source
const MethodConnectionTune = 30

MethodConnectionTune identifier

View Source
const MethodConnectionTuneOk = 31

MethodConnectionTuneOk identifier

View Source
const MethodConnectionUnblocked = 61

MethodConnectionUnblocked identifier

View Source
const MethodExchangeBind = 30

MethodExchangeBind identifier

View Source
const MethodExchangeBindOk = 31

MethodExchangeBindOk identifier

View Source
const MethodExchangeDeclare = 10

MethodExchangeDeclare identifier

View Source
const MethodExchangeDeclareOk = 11

MethodExchangeDeclareOk identifier

View Source
const MethodExchangeDelete = 20

MethodExchangeDelete identifier

View Source
const MethodExchangeDeleteOk = 21

MethodExchangeDeleteOk identifier

View Source
const MethodExchangeUnbind = 40

MethodExchangeUnbind identifier

View Source
const MethodExchangeUnbindOk = 51

MethodExchangeUnbindOk identifier

View Source
const MethodQueueBind = 20

MethodQueueBind identifier

View Source
const MethodQueueBindOk = 21

MethodQueueBindOk identifier

View Source
const MethodQueueDeclare = 10

MethodQueueDeclare identifier

View Source
const MethodQueueDeclareOk = 11

MethodQueueDeclareOk identifier

View Source
const MethodQueueDelete = 40

MethodQueueDelete identifier

View Source
const MethodQueueDeleteOk = 41

MethodQueueDeleteOk identifier

View Source
const MethodQueuePurge = 30

MethodQueuePurge identifier

View Source
const MethodQueuePurgeOk = 31

MethodQueuePurgeOk identifier

View Source
const MethodQueueUnbind = 50

MethodQueueUnbind identifier

View Source
const MethodQueueUnbindOk = 51

MethodQueueUnbindOk identifier

View Source
const MethodTxCommit = 20

MethodTxCommit identifier

View Source
const MethodTxCommitOk = 21

MethodTxCommitOk identifier

View Source
const MethodTxRollback = 30

MethodTxRollback identifier

View Source
const MethodTxRollbackOk = 31

MethodTxRollbackOk identifier

View Source
const MethodTxSelect = 10

MethodTxSelect identifier

View Source
const MethodTxSelectOk = 11

MethodTxSelectOk identifier

View Source
const NoConsumers = 313

NoConsumers identifier 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
const NoRoute = 312

NoRoute returns when a 'mandatory' message cannot be delivered to any queue. @see https://www.rabbitmq.com/amqp-0-9-1-errata.html#section_17

View Source
const NotAllowed = 530

NotAllowed identifier 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
const NotFound = 404

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

View Source
const NotImplemented = 540

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

View Source
const PreconditionFailed = 406

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

View Source
const ReplySuccess = 200

ReplySuccess identifier 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
const ResourceError = 506

ResourceError identifier 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
const ResourceLocked = 405

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

View Source
const SyntaxError = 502

SyntaxError identifier 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
const UnexpectedFrame = 505

UnexpectedFrame identifier 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.

Variables

View Source
var AmqpHeader = []byte{'A', 'M', 'Q', 'P', 0, 0, 9, 1}

AmqpHeader standard AMQP header

View Source
var ConstantsNameMap = map[uint16]string{

	1: "FRAME_METHOD",

	2: "FRAME_HEADER",

	3: "FRAME_BODY",

	8: "FRAME_HEARTBEAT",

	4096: "FRAME_MIN_SIZE",

	206: "FRAME_END",

	200: "REPLY_SUCCESS",

	311: "CONTENT_TOO_LARGE",

	313: "NO_CONSUMERS",

	320: "CONNECTION_FORCED",

	402: "INVALID_PATH",

	403: "ACCESS_REFUSED",

	404: "NOT_FOUND",

	405: "RESOURCE_LOCKED",

	406: "PRECONDITION_FAILED",

	501: "FRAME_ERROR",

	502: "SYNTAX_ERROR",

	503: "COMMAND_INVALID",

	504: "CHANNEL_ERROR",

	505: "UNEXPECTED_FRAME",

	506: "RESOURCE_ERROR",

	530: "NOT_ALLOWED",

	540: "NOT_IMPLEMENTED",

	541: "INTERNAL_ERROR",
}

ConstantsNameMap map for mapping error codes into error messages

Functions

func ReadLong

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

ReadLong reads 4 bytes

func ReadLonglong

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

ReadLonglong reads 8 bytes

func ReadLongstr

func ReadLongstr(r io.Reader) (data []byte, err error)

ReadLongstr reads long string Long string is just array of bytes

func ReadOctet

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

ReadOctet reads octet (byte)

func ReadShort

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

ReadShort reads 2 bytes

func ReadShortstr

func ReadShortstr(r io.Reader) (data string, err error)

ReadShortstr reads string

func ReadTimestamp

func ReadTimestamp(r io.Reader) (data time.Time, err error)

ReadTimestamp reads timestamp amqp presents timestamp as 8byte int

func WriteContentHeader

func WriteContentHeader(writer io.Writer, header *ContentHeader, protoVersion string) (err error)

WriteContentHeader writes amqp content header

func WriteFrame

func WriteFrame(wr io.Writer, frame *Frame) (err error)

WriteFrame pack amqp Frame as bytes and write to conn writer

func WriteLong

func WriteLong(wr io.Writer, data uint32) error

WriteLong writes 4 bytes

func WriteLonglong

func WriteLonglong(wr io.Writer, data uint64) error

WriteLonglong writes 8 bytes

func WriteLongstr

func WriteLongstr(wr io.Writer, data []byte) error

WriteLongstr writes long string

func WriteMethod

func WriteMethod(writer io.Writer, method Method, protoVersion string) (err error)

WriteMethod writes method into frame's payload

func WriteOctet

func WriteOctet(wr io.Writer, data byte) error

WriteOctet writes octet (byte)

func WriteShort

func WriteShort(wr io.Writer, data uint16) error

WriteShort writes 2 bytes

func WriteShortstr

func WriteShortstr(wr io.Writer, data string) error

WriteShortstr writes string

func WriteTable

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

WriteTable writes amqp table Standard amqp table and rabbitmq table are little different So we have second argument protoVersion to handle that issue

func WriteTimestamp

func WriteTimestamp(wr io.Writer, data time.Time) error

WriteTimestamp writes timestamp

Types

type BasicAck

type BasicAck struct {
	DeliveryTag uint64
	Multiple    bool
}

BasicAck When sent by the client, this method acknowledges one or more messages delivered via the Deliver or Get-Ok methods.

When sent by server, this method acknowledges one or more messages published with the Publish method on a channel in confirm mode.

The acknowledgement can be for a single message or a set of messages up to and including a specific message.

func (*BasicAck) ClassIdentifier

func (method *BasicAck) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicAck) FrameType

func (method *BasicAck) FrameType() byte

FrameType returns method frame type

func (*BasicAck) MethodIdentifier

func (method *BasicAck) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicAck) Name

func (method *BasicAck) Name() string

Name returns method name as string, usefully for logging

func (*BasicAck) Read

func (method *BasicAck) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicAck) Sync

func (method *BasicAck) Sync() bool

Sync is method should me sent synchronous

func (*BasicAck) Write

func (method *BasicAck) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicCancel

type BasicCancel struct {
	ConsumerTag string
	NoWait      bool
}

BasicCancel This method cancels a consumer. This does not affect already delivered messages, but it does mean the server will not send any more messages for that consumer. The client may receive an arbitrary number of messages in between sending the cancel method and receiving the cancel-ok reply.

It may also be sent from the server to the client in the event of the consumer being unexpectedly cancelled (i.e. cancelled for any reason other than the server receiving the corresponding basic.cancel from the client). This allows clients to be notified of the loss of consumers due to events such as queue deletion. Note that as it is not a MUST for clients to accept this method from the client, it is advisable for the broker to be able to identify those clients that are capable of accepting the method, through some means of capability negotiation.

func (*BasicCancel) ClassIdentifier

func (method *BasicCancel) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicCancel) FrameType

func (method *BasicCancel) FrameType() byte

FrameType returns method frame type

func (*BasicCancel) MethodIdentifier

func (method *BasicCancel) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicCancel) Name

func (method *BasicCancel) Name() string

Name returns method name as string, usefully for logging

func (*BasicCancel) Read

func (method *BasicCancel) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicCancel) Sync

func (method *BasicCancel) Sync() bool

Sync is method should me sent synchronous

func (*BasicCancel) Write

func (method *BasicCancel) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicCancelOk

type BasicCancelOk struct {
	ConsumerTag string
}

BasicCancelOk This method confirms that the cancellation was completed.

func (*BasicCancelOk) ClassIdentifier

func (method *BasicCancelOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicCancelOk) FrameType

func (method *BasicCancelOk) FrameType() byte

FrameType returns method frame type

func (*BasicCancelOk) MethodIdentifier

func (method *BasicCancelOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicCancelOk) Name

func (method *BasicCancelOk) Name() string

Name returns method name as string, usefully for logging

func (*BasicCancelOk) Read

func (method *BasicCancelOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicCancelOk) Sync

func (method *BasicCancelOk) Sync() bool

Sync is method should me sent synchronous

func (*BasicCancelOk) Write

func (method *BasicCancelOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicConsume

type BasicConsume struct {
	Reserved1   uint16
	Queue       string
	ConsumerTag string
	NoLocal     bool
	NoAck       bool
	Exclusive   bool
	NoWait      bool
	Arguments   *Table
}

BasicConsume This method asks the server to start a "consumer", which is a transient request for messages from a specific queue. Consumers last as long as the channel they were declared on, or until the client cancels them.

func (*BasicConsume) ClassIdentifier

func (method *BasicConsume) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicConsume) FrameType

func (method *BasicConsume) FrameType() byte

FrameType returns method frame type

func (*BasicConsume) MethodIdentifier

func (method *BasicConsume) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicConsume) Name

func (method *BasicConsume) Name() string

Name returns method name as string, usefully for logging

func (*BasicConsume) Read

func (method *BasicConsume) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicConsume) Sync

func (method *BasicConsume) Sync() bool

Sync is method should me sent synchronous

func (*BasicConsume) Write

func (method *BasicConsume) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicConsumeOk

type BasicConsumeOk struct {
	ConsumerTag string
}

BasicConsumeOk The server provides the client with a consumer tag, which is used by the client for methods called on the consumer at a later stage.

func (*BasicConsumeOk) ClassIdentifier

func (method *BasicConsumeOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicConsumeOk) FrameType

func (method *BasicConsumeOk) FrameType() byte

FrameType returns method frame type

func (*BasicConsumeOk) MethodIdentifier

func (method *BasicConsumeOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicConsumeOk) Name

func (method *BasicConsumeOk) Name() string

Name returns method name as string, usefully for logging

func (*BasicConsumeOk) Read

func (method *BasicConsumeOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicConsumeOk) Sync

func (method *BasicConsumeOk) Sync() bool

Sync is method should me sent synchronous

func (*BasicConsumeOk) Write

func (method *BasicConsumeOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicDeliver

type BasicDeliver struct {
	ConsumerTag string
	DeliveryTag uint64
	Redelivered bool
	Exchange    string
	RoutingKey  string
}

BasicDeliver This method delivers a message to the client, via a consumer. In the asynchronous message delivery model, the client starts a consumer using the Consume method, then the server responds with Deliver methods as and when messages arrive for that consumer.

func (*BasicDeliver) ClassIdentifier

func (method *BasicDeliver) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicDeliver) FrameType

func (method *BasicDeliver) FrameType() byte

FrameType returns method frame type

func (*BasicDeliver) MethodIdentifier

func (method *BasicDeliver) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicDeliver) Name

func (method *BasicDeliver) Name() string

Name returns method name as string, usefully for logging

func (*BasicDeliver) Read

func (method *BasicDeliver) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicDeliver) Sync

func (method *BasicDeliver) Sync() bool

Sync is method should me sent synchronous

func (*BasicDeliver) Write

func (method *BasicDeliver) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicGet

type BasicGet struct {
	Reserved1 uint16
	Queue     string
	NoAck     bool
}

BasicGet This method provides a direct access to the messages in a queue using a synchronous dialogue that is designed for specific types of application where synchronous functionality is more important than performance.

func (*BasicGet) ClassIdentifier

func (method *BasicGet) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicGet) FrameType

func (method *BasicGet) FrameType() byte

FrameType returns method frame type

func (*BasicGet) MethodIdentifier

func (method *BasicGet) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicGet) Name

func (method *BasicGet) Name() string

Name returns method name as string, usefully for logging

func (*BasicGet) Read

func (method *BasicGet) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicGet) Sync

func (method *BasicGet) Sync() bool

Sync is method should me sent synchronous

func (*BasicGet) Write

func (method *BasicGet) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicGetEmpty

type BasicGetEmpty struct {
	Reserved1 string
}

BasicGetEmpty This method tells the client that the queue has no messages available for the client.

func (*BasicGetEmpty) ClassIdentifier

func (method *BasicGetEmpty) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicGetEmpty) FrameType

func (method *BasicGetEmpty) FrameType() byte

FrameType returns method frame type

func (*BasicGetEmpty) MethodIdentifier

func (method *BasicGetEmpty) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicGetEmpty) Name

func (method *BasicGetEmpty) Name() string

Name returns method name as string, usefully for logging

func (*BasicGetEmpty) Read

func (method *BasicGetEmpty) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicGetEmpty) Sync

func (method *BasicGetEmpty) Sync() bool

Sync is method should me sent synchronous

func (*BasicGetEmpty) Write

func (method *BasicGetEmpty) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicGetOk

type BasicGetOk struct {
	DeliveryTag  uint64
	Redelivered  bool
	Exchange     string
	RoutingKey   string
	MessageCount uint32
}

BasicGetOk This method delivers a message to the client following a get method. A message delivered by 'get-ok' must be acknowledged unless the no-ack option was set in the get method.

func (*BasicGetOk) ClassIdentifier

func (method *BasicGetOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicGetOk) FrameType

func (method *BasicGetOk) FrameType() byte

FrameType returns method frame type

func (*BasicGetOk) MethodIdentifier

func (method *BasicGetOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicGetOk) Name

func (method *BasicGetOk) Name() string

Name returns method name as string, usefully for logging

func (*BasicGetOk) Read

func (method *BasicGetOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicGetOk) Sync

func (method *BasicGetOk) Sync() bool

Sync is method should me sent synchronous

func (*BasicGetOk) Write

func (method *BasicGetOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicNack

type BasicNack struct {
	DeliveryTag uint64
	Multiple    bool
	Requeue     bool
}

BasicNack This method allows a client to reject one or more incoming messages. It can be used to interrupt and cancel large incoming messages, or return untreatable messages to their original queue.

This method is also used by the server to inform publishers on channels in confirm mode of unhandled messages. If a publisher receives this method, it probably needs to republish the offending messages.

func (*BasicNack) ClassIdentifier

func (method *BasicNack) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicNack) FrameType

func (method *BasicNack) FrameType() byte

FrameType returns method frame type

func (*BasicNack) MethodIdentifier

func (method *BasicNack) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicNack) Name

func (method *BasicNack) Name() string

Name returns method name as string, usefully for logging

func (*BasicNack) Read

func (method *BasicNack) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicNack) Sync

func (method *BasicNack) Sync() bool

Sync is method should me sent synchronous

func (*BasicNack) Write

func (method *BasicNack) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicPropertyList

type BasicPropertyList struct {
	ContentType     *string
	ContentEncoding *string
	Headers         *Table
	DeliveryMode    *byte
	Priority        *byte
	CorrelationID   *string
	ReplyTo         *string
	Expiration      *string
	MessageID       *string
	Timestamp       *time.Time
	Type            *string
	UserID          *string
	AppID           *string
	Reserved        *string
}

BasicPropertyList represents properties for Basic method

func (*BasicPropertyList) Read

func (pList *BasicPropertyList) Read(reader io.Reader, propertyFlags uint16, protoVersion string) (err error)

BasicPropertyList reads properties from io reader

func (*BasicPropertyList) Write

func (pList *BasicPropertyList) Write(writer io.Writer, protoVersion string) (propertyFlags uint16, err error)

BasicPropertyList wiretes properties into io writer

type BasicPublish

type BasicPublish struct {
	Reserved1  uint16
	Exchange   string
	RoutingKey string
	Mandatory  bool
	Immediate  bool
}

BasicPublish This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed.

func (*BasicPublish) ClassIdentifier

func (method *BasicPublish) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicPublish) FrameType

func (method *BasicPublish) FrameType() byte

FrameType returns method frame type

func (*BasicPublish) MethodIdentifier

func (method *BasicPublish) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicPublish) Name

func (method *BasicPublish) Name() string

Name returns method name as string, usefully for logging

func (*BasicPublish) Read

func (method *BasicPublish) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicPublish) Sync

func (method *BasicPublish) Sync() bool

Sync is method should me sent synchronous

func (*BasicPublish) Write

func (method *BasicPublish) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicQos

type BasicQos struct {
	PrefetchSize  uint32
	PrefetchCount uint16
	Global        bool
}

BasicQos This method requests a specific quality of service. The QoS can be specified for the current channel or for all channels on the connection. The particular properties and semantics of a qos method always depend on the content class semantics. Though the qos method could in principle apply to both peers, it is currently meaningful only for the server.

func (*BasicQos) ClassIdentifier

func (method *BasicQos) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicQos) FrameType

func (method *BasicQos) FrameType() byte

FrameType returns method frame type

func (*BasicQos) MethodIdentifier

func (method *BasicQos) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicQos) Name

func (method *BasicQos) Name() string

Name returns method name as string, usefully for logging

func (*BasicQos) Read

func (method *BasicQos) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicQos) Sync

func (method *BasicQos) Sync() bool

Sync is method should me sent synchronous

func (*BasicQos) Write

func (method *BasicQos) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicQosOk

type BasicQosOk struct {
}

BasicQosOk This method tells the client that the requested QoS levels could be handled by the server. The requested QoS applies to all active consumers until a new QoS is defined.

func (*BasicQosOk) ClassIdentifier

func (method *BasicQosOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicQosOk) FrameType

func (method *BasicQosOk) FrameType() byte

FrameType returns method frame type

func (*BasicQosOk) MethodIdentifier

func (method *BasicQosOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicQosOk) Name

func (method *BasicQosOk) Name() string

Name returns method name as string, usefully for logging

func (*BasicQosOk) Read

func (method *BasicQosOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicQosOk) Sync

func (method *BasicQosOk) Sync() bool

Sync is method should me sent synchronous

func (*BasicQosOk) Write

func (method *BasicQosOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicRecover

type BasicRecover struct {
	Requeue bool
}

BasicRecover This method asks the server to redeliver all unacknowledged messages on a specified channel. Zero or more messages may be redelivered. This method replaces the asynchronous Recover.

func (*BasicRecover) ClassIdentifier

func (method *BasicRecover) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicRecover) FrameType

func (method *BasicRecover) FrameType() byte

FrameType returns method frame type

func (*BasicRecover) MethodIdentifier

func (method *BasicRecover) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicRecover) Name

func (method *BasicRecover) Name() string

Name returns method name as string, usefully for logging

func (*BasicRecover) Read

func (method *BasicRecover) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicRecover) Sync

func (method *BasicRecover) Sync() bool

Sync is method should me sent synchronous

func (*BasicRecover) Write

func (method *BasicRecover) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicRecoverAsync

type BasicRecoverAsync struct {
	Requeue bool
}

BasicRecoverAsync This method asks the server to redeliver all unacknowledged messages on a specified channel. Zero or more messages may be redelivered. This method is deprecated in favour of the synchronous Recover/Recover-Ok.

func (*BasicRecoverAsync) ClassIdentifier

func (method *BasicRecoverAsync) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicRecoverAsync) FrameType

func (method *BasicRecoverAsync) FrameType() byte

FrameType returns method frame type

func (*BasicRecoverAsync) MethodIdentifier

func (method *BasicRecoverAsync) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicRecoverAsync) Name

func (method *BasicRecoverAsync) Name() string

Name returns method name as string, usefully for logging

func (*BasicRecoverAsync) Read

func (method *BasicRecoverAsync) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicRecoverAsync) Sync

func (method *BasicRecoverAsync) Sync() bool

Sync is method should me sent synchronous

func (*BasicRecoverAsync) Write

func (method *BasicRecoverAsync) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicRecoverOk

type BasicRecoverOk struct {
}

BasicRecoverOk This method acknowledges a Basic.Recover method.

func (*BasicRecoverOk) ClassIdentifier

func (method *BasicRecoverOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicRecoverOk) FrameType

func (method *BasicRecoverOk) FrameType() byte

FrameType returns method frame type

func (*BasicRecoverOk) MethodIdentifier

func (method *BasicRecoverOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicRecoverOk) Name

func (method *BasicRecoverOk) Name() string

Name returns method name as string, usefully for logging

func (*BasicRecoverOk) Read

func (method *BasicRecoverOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicRecoverOk) Sync

func (method *BasicRecoverOk) Sync() bool

Sync is method should me sent synchronous

func (*BasicRecoverOk) Write

func (method *BasicRecoverOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicReject

type BasicReject struct {
	DeliveryTag uint64
	Requeue     bool
}

BasicReject This method allows a client to reject a message. It can be used to interrupt and cancel large incoming messages, or return untreatable messages to their original queue.

func (*BasicReject) ClassIdentifier

func (method *BasicReject) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicReject) FrameType

func (method *BasicReject) FrameType() byte

FrameType returns method frame type

func (*BasicReject) MethodIdentifier

func (method *BasicReject) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicReject) Name

func (method *BasicReject) Name() string

Name returns method name as string, usefully for logging

func (*BasicReject) Read

func (method *BasicReject) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicReject) Sync

func (method *BasicReject) Sync() bool

Sync is method should me sent synchronous

func (*BasicReject) Write

func (method *BasicReject) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type BasicReturn

type BasicReturn struct {
	ReplyCode  uint16
	ReplyText  string
	Exchange   string
	RoutingKey string
}

BasicReturn This method returns an undeliverable message that was published with the "immediate" flag set, or an unroutable message published with the "mandatory" flag set. The reply code and text provide information about the reason that the message was undeliverable.

func (*BasicReturn) ClassIdentifier

func (method *BasicReturn) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*BasicReturn) FrameType

func (method *BasicReturn) FrameType() byte

FrameType returns method frame type

func (*BasicReturn) MethodIdentifier

func (method *BasicReturn) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*BasicReturn) Name

func (method *BasicReturn) Name() string

Name returns method name as string, usefully for logging

func (*BasicReturn) Read

func (method *BasicReturn) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*BasicReturn) Sync

func (method *BasicReturn) Sync() bool

Sync is method should me sent synchronous

func (*BasicReturn) Write

func (method *BasicReturn) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ChannelClose

type ChannelClose struct {
	ReplyCode uint16
	ReplyText string
	ClassID   uint16
	MethodID  uint16
}

ChannelClose This method indicates that the sender wants to close the channel. This may be due to internal conditions (e.g. a forced shut-down) or due to an error handling a specific method, i.e. an exception. When a close is due to an exception, the sender provides the class and method id of the method which caused the exception.

func (*ChannelClose) ClassIdentifier

func (method *ChannelClose) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ChannelClose) FrameType

func (method *ChannelClose) FrameType() byte

FrameType returns method frame type

func (*ChannelClose) MethodIdentifier

func (method *ChannelClose) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ChannelClose) Name

func (method *ChannelClose) Name() string

Name returns method name as string, usefully for logging

func (*ChannelClose) Read

func (method *ChannelClose) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ChannelClose) Sync

func (method *ChannelClose) Sync() bool

Sync is method should me sent synchronous

func (*ChannelClose) Write

func (method *ChannelClose) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ChannelCloseOk

type ChannelCloseOk struct {
}

ChannelCloseOk This method confirms a Channel.Close method and tells the recipient that it is safe to release resources for the channel.

func (*ChannelCloseOk) ClassIdentifier

func (method *ChannelCloseOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ChannelCloseOk) FrameType

func (method *ChannelCloseOk) FrameType() byte

FrameType returns method frame type

func (*ChannelCloseOk) MethodIdentifier

func (method *ChannelCloseOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ChannelCloseOk) Name

func (method *ChannelCloseOk) Name() string

Name returns method name as string, usefully for logging

func (*ChannelCloseOk) Read

func (method *ChannelCloseOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ChannelCloseOk) Sync

func (method *ChannelCloseOk) Sync() bool

Sync is method should me sent synchronous

func (*ChannelCloseOk) Write

func (method *ChannelCloseOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ChannelFlow

type ChannelFlow struct {
	Active bool
}

ChannelFlow This method asks the peer to pause or restart the flow of content data sent by a consumer. This is a simple flow-control mechanism that a peer can use to avoid overflowing its queues or otherwise finding itself receiving more messages than it can process. Note that this method is not intended for window control. It does not affect contents returned by Basic.Get-Ok methods.

func (*ChannelFlow) ClassIdentifier

func (method *ChannelFlow) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ChannelFlow) FrameType

func (method *ChannelFlow) FrameType() byte

FrameType returns method frame type

func (*ChannelFlow) MethodIdentifier

func (method *ChannelFlow) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ChannelFlow) Name

func (method *ChannelFlow) Name() string

Name returns method name as string, usefully for logging

func (*ChannelFlow) Read

func (method *ChannelFlow) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ChannelFlow) Sync

func (method *ChannelFlow) Sync() bool

Sync is method should me sent synchronous

func (*ChannelFlow) Write

func (method *ChannelFlow) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ChannelFlowOk

type ChannelFlowOk struct {
	Active bool
}

ChannelFlowOk Confirms to the peer that a flow command was received and processed.

func (*ChannelFlowOk) ClassIdentifier

func (method *ChannelFlowOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ChannelFlowOk) FrameType

func (method *ChannelFlowOk) FrameType() byte

FrameType returns method frame type

func (*ChannelFlowOk) MethodIdentifier

func (method *ChannelFlowOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ChannelFlowOk) Name

func (method *ChannelFlowOk) Name() string

Name returns method name as string, usefully for logging

func (*ChannelFlowOk) Read

func (method *ChannelFlowOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ChannelFlowOk) Sync

func (method *ChannelFlowOk) Sync() bool

Sync is method should me sent synchronous

func (*ChannelFlowOk) Write

func (method *ChannelFlowOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ChannelOpen

type ChannelOpen struct {
	Reserved1 string
}

ChannelOpen This method opens a channel to the server.

func (*ChannelOpen) ClassIdentifier

func (method *ChannelOpen) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ChannelOpen) FrameType

func (method *ChannelOpen) FrameType() byte

FrameType returns method frame type

func (*ChannelOpen) MethodIdentifier

func (method *ChannelOpen) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ChannelOpen) Name

func (method *ChannelOpen) Name() string

Name returns method name as string, usefully for logging

func (*ChannelOpen) Read

func (method *ChannelOpen) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ChannelOpen) Sync

func (method *ChannelOpen) Sync() bool

Sync is method should me sent synchronous

func (*ChannelOpen) Write

func (method *ChannelOpen) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ChannelOpenOk

type ChannelOpenOk struct {
	Reserved1 []byte
}

ChannelOpenOk This method signals to the client that the channel is ready for use.

func (*ChannelOpenOk) ClassIdentifier

func (method *ChannelOpenOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ChannelOpenOk) FrameType

func (method *ChannelOpenOk) FrameType() byte

FrameType returns method frame type

func (*ChannelOpenOk) MethodIdentifier

func (method *ChannelOpenOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ChannelOpenOk) Name

func (method *ChannelOpenOk) Name() string

Name returns method name as string, usefully for logging

func (*ChannelOpenOk) Read

func (method *ChannelOpenOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ChannelOpenOk) Sync

func (method *ChannelOpenOk) Sync() bool

Sync is method should me sent synchronous

func (*ChannelOpenOk) Write

func (method *ChannelOpenOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConfirmMeta

type ConfirmMeta struct {
	ChanID           uint16
	ConnID           uint64
	DeliveryTag      uint64
	ExpectedConfirms int
	ActualConfirms   int
}

ConfirmMeta store information for check confirms and send confirm-acks

func (*ConfirmMeta) CanConfirm

func (meta *ConfirmMeta) CanConfirm() bool

CanConfirm returns is message can be confirmed

type ConfirmSelect

type ConfirmSelect struct {
	Nowait bool
}

ConfirmSelect This method sets the channel to use publisher acknowledgements. The client can only use this method on a non-transactional channel.

func (*ConfirmSelect) ClassIdentifier

func (method *ConfirmSelect) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConfirmSelect) FrameType

func (method *ConfirmSelect) FrameType() byte

FrameType returns method frame type

func (*ConfirmSelect) MethodIdentifier

func (method *ConfirmSelect) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConfirmSelect) Name

func (method *ConfirmSelect) Name() string

Name returns method name as string, usefully for logging

func (*ConfirmSelect) Read

func (method *ConfirmSelect) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConfirmSelect) Sync

func (method *ConfirmSelect) Sync() bool

Sync is method should me sent synchronous

func (*ConfirmSelect) Write

func (method *ConfirmSelect) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConfirmSelectOk

type ConfirmSelectOk struct {
}

ConfirmSelectOk This method confirms to the client that the channel was successfully set to use publisher acknowledgements.

func (*ConfirmSelectOk) ClassIdentifier

func (method *ConfirmSelectOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConfirmSelectOk) FrameType

func (method *ConfirmSelectOk) FrameType() byte

FrameType returns method frame type

func (*ConfirmSelectOk) MethodIdentifier

func (method *ConfirmSelectOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConfirmSelectOk) Name

func (method *ConfirmSelectOk) Name() string

Name returns method name as string, usefully for logging

func (*ConfirmSelectOk) Read

func (method *ConfirmSelectOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConfirmSelectOk) Sync

func (method *ConfirmSelectOk) Sync() bool

Sync is method should me sent synchronous

func (*ConfirmSelectOk) Write

func (method *ConfirmSelectOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionBlocked

type ConnectionBlocked struct {
	Reason string
}

ConnectionBlocked This method indicates that a connection has been blocked and does not accept new publishes.

func (*ConnectionBlocked) ClassIdentifier

func (method *ConnectionBlocked) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionBlocked) FrameType

func (method *ConnectionBlocked) FrameType() byte

FrameType returns method frame type

func (*ConnectionBlocked) MethodIdentifier

func (method *ConnectionBlocked) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionBlocked) Name

func (method *ConnectionBlocked) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionBlocked) Read

func (method *ConnectionBlocked) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionBlocked) Sync

func (method *ConnectionBlocked) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionBlocked) Write

func (method *ConnectionBlocked) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionClose

type ConnectionClose struct {
	ReplyCode uint16
	ReplyText string
	ClassID   uint16
	MethodID  uint16
}

ConnectionClose This method indicates that the sender wants to close the connection. This may be due to internal conditions (e.g. a forced shut-down) or due to an error handling a specific method, i.e. an exception. When a close is due to an exception, the sender provides the class and method id of the method which caused the exception.

func (*ConnectionClose) ClassIdentifier

func (method *ConnectionClose) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionClose) FrameType

func (method *ConnectionClose) FrameType() byte

FrameType returns method frame type

func (*ConnectionClose) MethodIdentifier

func (method *ConnectionClose) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionClose) Name

func (method *ConnectionClose) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionClose) Read

func (method *ConnectionClose) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionClose) Sync

func (method *ConnectionClose) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionClose) Write

func (method *ConnectionClose) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionCloseOk

type ConnectionCloseOk struct {
}

ConnectionCloseOk This method confirms a Connection.Close method and tells the recipient that it is safe to release resources for the connection and close the socket.

func (*ConnectionCloseOk) ClassIdentifier

func (method *ConnectionCloseOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionCloseOk) FrameType

func (method *ConnectionCloseOk) FrameType() byte

FrameType returns method frame type

func (*ConnectionCloseOk) MethodIdentifier

func (method *ConnectionCloseOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionCloseOk) Name

func (method *ConnectionCloseOk) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionCloseOk) Read

func (method *ConnectionCloseOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionCloseOk) Sync

func (method *ConnectionCloseOk) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionCloseOk) Write

func (method *ConnectionCloseOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionOpen

type ConnectionOpen struct {
	VirtualHost string
	Reserved1   string
	Reserved2   bool
}

ConnectionOpen This method opens a connection to a virtual host, which is a collection of resources, and acts to separate multiple application domains within a server. The server may apply arbitrary limits per virtual host, such as the number of each type of entity that may be used, per connection and/or in total.

func (*ConnectionOpen) ClassIdentifier

func (method *ConnectionOpen) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionOpen) FrameType

func (method *ConnectionOpen) FrameType() byte

FrameType returns method frame type

func (*ConnectionOpen) MethodIdentifier

func (method *ConnectionOpen) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionOpen) Name

func (method *ConnectionOpen) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionOpen) Read

func (method *ConnectionOpen) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionOpen) Sync

func (method *ConnectionOpen) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionOpen) Write

func (method *ConnectionOpen) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionOpenOk

type ConnectionOpenOk struct {
	Reserved1 string
}

ConnectionOpenOk This method signals to the client that the connection is ready for use.

func (*ConnectionOpenOk) ClassIdentifier

func (method *ConnectionOpenOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionOpenOk) FrameType

func (method *ConnectionOpenOk) FrameType() byte

FrameType returns method frame type

func (*ConnectionOpenOk) MethodIdentifier

func (method *ConnectionOpenOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionOpenOk) Name

func (method *ConnectionOpenOk) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionOpenOk) Read

func (method *ConnectionOpenOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionOpenOk) Sync

func (method *ConnectionOpenOk) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionOpenOk) Write

func (method *ConnectionOpenOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionSecure

type ConnectionSecure struct {
	Challenge []byte
}

ConnectionSecure The SASL protocol works by exchanging challenges and responses until both peers have received sufficient information to authenticate each other. This method challenges the client to provide more information.

func (*ConnectionSecure) ClassIdentifier

func (method *ConnectionSecure) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionSecure) FrameType

func (method *ConnectionSecure) FrameType() byte

FrameType returns method frame type

func (*ConnectionSecure) MethodIdentifier

func (method *ConnectionSecure) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionSecure) Name

func (method *ConnectionSecure) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionSecure) Read

func (method *ConnectionSecure) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionSecure) Sync

func (method *ConnectionSecure) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionSecure) Write

func (method *ConnectionSecure) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionSecureOk

type ConnectionSecureOk struct {
	Response []byte
}

ConnectionSecureOk This method attempts to authenticate, passing a block of SASL data for the security mechanism at the server side.

func (*ConnectionSecureOk) ClassIdentifier

func (method *ConnectionSecureOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionSecureOk) FrameType

func (method *ConnectionSecureOk) FrameType() byte

FrameType returns method frame type

func (*ConnectionSecureOk) MethodIdentifier

func (method *ConnectionSecureOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionSecureOk) Name

func (method *ConnectionSecureOk) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionSecureOk) Read

func (method *ConnectionSecureOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionSecureOk) Sync

func (method *ConnectionSecureOk) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionSecureOk) Write

func (method *ConnectionSecureOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionStart

type ConnectionStart struct {
	VersionMajor     byte
	VersionMinor     byte
	ServerProperties *Table
	Mechanisms       []byte
	Locales          []byte
}

ConnectionStart This method starts the connection negotiation process by telling the client the protocol version that the server proposes, along with a list of security mechanisms which the client can use for authentication.

func (*ConnectionStart) ClassIdentifier

func (method *ConnectionStart) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionStart) FrameType

func (method *ConnectionStart) FrameType() byte

FrameType returns method frame type

func (*ConnectionStart) MethodIdentifier

func (method *ConnectionStart) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionStart) Name

func (method *ConnectionStart) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionStart) Read

func (method *ConnectionStart) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionStart) Sync

func (method *ConnectionStart) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionStart) Write

func (method *ConnectionStart) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionStartOk

type ConnectionStartOk struct {
	ClientProperties *Table
	Mechanism        string
	Response         []byte
	Locale           string
}

ConnectionStartOk This method selects a SASL security mechanism.

func (*ConnectionStartOk) ClassIdentifier

func (method *ConnectionStartOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionStartOk) FrameType

func (method *ConnectionStartOk) FrameType() byte

FrameType returns method frame type

func (*ConnectionStartOk) MethodIdentifier

func (method *ConnectionStartOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionStartOk) Name

func (method *ConnectionStartOk) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionStartOk) Read

func (method *ConnectionStartOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionStartOk) Sync

func (method *ConnectionStartOk) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionStartOk) Write

func (method *ConnectionStartOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionTune

type ConnectionTune struct {
	ChannelMax uint16
	FrameMax   uint32
	Heartbeat  uint16
}

ConnectionTune This method proposes a set of connection configuration values to the client. The client can accept and/or adjust these.

func (*ConnectionTune) ClassIdentifier

func (method *ConnectionTune) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionTune) FrameType

func (method *ConnectionTune) FrameType() byte

FrameType returns method frame type

func (*ConnectionTune) MethodIdentifier

func (method *ConnectionTune) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionTune) Name

func (method *ConnectionTune) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionTune) Read

func (method *ConnectionTune) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionTune) Sync

func (method *ConnectionTune) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionTune) Write

func (method *ConnectionTune) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionTuneOk

type ConnectionTuneOk struct {
	ChannelMax uint16
	FrameMax   uint32
	Heartbeat  uint16
}

ConnectionTuneOk This method sends the client's connection tuning parameters to the server. Certain fields are negotiated, others provide capability information.

func (*ConnectionTuneOk) ClassIdentifier

func (method *ConnectionTuneOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionTuneOk) FrameType

func (method *ConnectionTuneOk) FrameType() byte

FrameType returns method frame type

func (*ConnectionTuneOk) MethodIdentifier

func (method *ConnectionTuneOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionTuneOk) Name

func (method *ConnectionTuneOk) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionTuneOk) Read

func (method *ConnectionTuneOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionTuneOk) Sync

func (method *ConnectionTuneOk) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionTuneOk) Write

func (method *ConnectionTuneOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ConnectionUnblocked

type ConnectionUnblocked struct {
}

ConnectionUnblocked This method indicates that a connection has been unblocked and now accepts publishes.

func (*ConnectionUnblocked) ClassIdentifier

func (method *ConnectionUnblocked) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ConnectionUnblocked) FrameType

func (method *ConnectionUnblocked) FrameType() byte

FrameType returns method frame type

func (*ConnectionUnblocked) MethodIdentifier

func (method *ConnectionUnblocked) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ConnectionUnblocked) Name

func (method *ConnectionUnblocked) Name() string

Name returns method name as string, usefully for logging

func (*ConnectionUnblocked) Read

func (method *ConnectionUnblocked) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ConnectionUnblocked) Sync

func (method *ConnectionUnblocked) Sync() bool

Sync is method should me sent synchronous

func (*ConnectionUnblocked) Write

func (method *ConnectionUnblocked) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ContentHeader

type ContentHeader struct {
	BodySize uint64
	ClassID  uint16
	Weight   uint16

	PropertyList *BasicPropertyList
	// contains filtered or unexported fields
}

ContentHeader represents amqp-message content-header

func ReadContentHeader

func ReadContentHeader(r io.Reader, protoVersion string) (*ContentHeader, error)

ReadContentHeader reads amqp content header

Certain methods (such as Basic.Publish, Basic.Deliver, etc.) are formally defined as carrying content. When a peer sends such a method frame, it always follows it with a content header and zero or more content body frames.

A content header frame has this format:

0          2        4           12               14
+----------+--------+-----------+----------------+------------- - -
| class-id | weight | body size | property flags | property list...
+----------+--------+-----------+----------------+------------- - -
  short     short    long long       short        remainder...

type Decimal

type Decimal struct {
	Scale uint8
	Value int32
}

Decimal represents amqp-decimal data

type Error

type Error struct {
	ReplyCode uint16
	ReplyText string
	ClassID   uint16
	MethodID  uint16
	ErrorType int
}

Error represents AMQP-error data

func NewChannelError

func NewChannelError(code uint16, text string, classID uint16, methodID uint16) *Error

NewChannelError returns new channel error& If caused - channel should be closed

func NewConnectionError

func NewConnectionError(code uint16, text string, classID uint16, methodID uint16) *Error

NewConnectionError returns new connection error. If caused - connection should be closed

type ExchangeBind

type ExchangeBind struct {
	Reserved1   uint16
	Destination string
	Source      string
	RoutingKey  string
	NoWait      bool
	Arguments   *Table
}

ExchangeBind This method binds an exchange to an exchange.

func (*ExchangeBind) ClassIdentifier

func (method *ExchangeBind) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeBind) FrameType

func (method *ExchangeBind) FrameType() byte

FrameType returns method frame type

func (*ExchangeBind) MethodIdentifier

func (method *ExchangeBind) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeBind) Name

func (method *ExchangeBind) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeBind) Read

func (method *ExchangeBind) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeBind) Sync

func (method *ExchangeBind) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeBind) Write

func (method *ExchangeBind) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ExchangeBindOk

type ExchangeBindOk struct {
}

ExchangeBindOk This method confirms that the bind was successful.

func (*ExchangeBindOk) ClassIdentifier

func (method *ExchangeBindOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeBindOk) FrameType

func (method *ExchangeBindOk) FrameType() byte

FrameType returns method frame type

func (*ExchangeBindOk) MethodIdentifier

func (method *ExchangeBindOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeBindOk) Name

func (method *ExchangeBindOk) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeBindOk) Read

func (method *ExchangeBindOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeBindOk) Sync

func (method *ExchangeBindOk) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeBindOk) Write

func (method *ExchangeBindOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ExchangeDeclare

type ExchangeDeclare struct {
	Reserved1  uint16
	Exchange   string
	Type       string
	Passive    bool
	Durable    bool
	AutoDelete bool
	Internal   bool
	NoWait     bool
	Arguments  *Table
}

ExchangeDeclare This method creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.

func (*ExchangeDeclare) ClassIdentifier

func (method *ExchangeDeclare) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeDeclare) FrameType

func (method *ExchangeDeclare) FrameType() byte

FrameType returns method frame type

func (*ExchangeDeclare) MethodIdentifier

func (method *ExchangeDeclare) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeDeclare) Name

func (method *ExchangeDeclare) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeDeclare) Read

func (method *ExchangeDeclare) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeDeclare) Sync

func (method *ExchangeDeclare) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeDeclare) Write

func (method *ExchangeDeclare) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ExchangeDeclareOk

type ExchangeDeclareOk struct {
}

ExchangeDeclareOk This method confirms a Declare method and confirms the name of the exchange, essential for automatically-named exchanges.

func (*ExchangeDeclareOk) ClassIdentifier

func (method *ExchangeDeclareOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeDeclareOk) FrameType

func (method *ExchangeDeclareOk) FrameType() byte

FrameType returns method frame type

func (*ExchangeDeclareOk) MethodIdentifier

func (method *ExchangeDeclareOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeDeclareOk) Name

func (method *ExchangeDeclareOk) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeDeclareOk) Read

func (method *ExchangeDeclareOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeDeclareOk) Sync

func (method *ExchangeDeclareOk) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeDeclareOk) Write

func (method *ExchangeDeclareOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ExchangeDelete

type ExchangeDelete struct {
	Reserved1 uint16
	Exchange  string
	IfUnused  bool
	NoWait    bool
}

ExchangeDelete This method deletes an exchange. When an exchange is deleted all queue bindings on the exchange are cancelled.

func (*ExchangeDelete) ClassIdentifier

func (method *ExchangeDelete) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeDelete) FrameType

func (method *ExchangeDelete) FrameType() byte

FrameType returns method frame type

func (*ExchangeDelete) MethodIdentifier

func (method *ExchangeDelete) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeDelete) Name

func (method *ExchangeDelete) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeDelete) Read

func (method *ExchangeDelete) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeDelete) Sync

func (method *ExchangeDelete) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeDelete) Write

func (method *ExchangeDelete) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ExchangeDeleteOk

type ExchangeDeleteOk struct {
}

ExchangeDeleteOk This method confirms the deletion of an exchange.

func (*ExchangeDeleteOk) ClassIdentifier

func (method *ExchangeDeleteOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeDeleteOk) FrameType

func (method *ExchangeDeleteOk) FrameType() byte

FrameType returns method frame type

func (*ExchangeDeleteOk) MethodIdentifier

func (method *ExchangeDeleteOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeDeleteOk) Name

func (method *ExchangeDeleteOk) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeDeleteOk) Read

func (method *ExchangeDeleteOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeDeleteOk) Sync

func (method *ExchangeDeleteOk) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeDeleteOk) Write

func (method *ExchangeDeleteOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ExchangeUnbind

type ExchangeUnbind struct {
	Reserved1   uint16
	Destination string
	Source      string
	RoutingKey  string
	NoWait      bool
	Arguments   *Table
}

ExchangeUnbind This method unbinds an exchange from an exchange.

func (*ExchangeUnbind) ClassIdentifier

func (method *ExchangeUnbind) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeUnbind) FrameType

func (method *ExchangeUnbind) FrameType() byte

FrameType returns method frame type

func (*ExchangeUnbind) MethodIdentifier

func (method *ExchangeUnbind) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeUnbind) Name

func (method *ExchangeUnbind) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeUnbind) Read

func (method *ExchangeUnbind) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeUnbind) Sync

func (method *ExchangeUnbind) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeUnbind) Write

func (method *ExchangeUnbind) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type ExchangeUnbindOk

type ExchangeUnbindOk struct {
}

ExchangeUnbindOk This method confirms that the unbind was successful.

func (*ExchangeUnbindOk) ClassIdentifier

func (method *ExchangeUnbindOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*ExchangeUnbindOk) FrameType

func (method *ExchangeUnbindOk) FrameType() byte

FrameType returns method frame type

func (*ExchangeUnbindOk) MethodIdentifier

func (method *ExchangeUnbindOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*ExchangeUnbindOk) Name

func (method *ExchangeUnbindOk) Name() string

Name returns method name as string, usefully for logging

func (*ExchangeUnbindOk) Read

func (method *ExchangeUnbindOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*ExchangeUnbindOk) Sync

func (method *ExchangeUnbindOk) Sync() bool

Sync is method should me sent synchronous

func (*ExchangeUnbindOk) Write

func (method *ExchangeUnbindOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type Frame

type Frame struct {
	ChannelID  uint16
	Type       byte
	CloseAfter bool
	Sync       bool
	Payload    []byte
}

Frame is raw frame

func ReadFrame

func ReadFrame(r io.Reader) (frame *Frame, err error)

ReadFrame reads and parses raw data from conn reader and returns amqp frame

@spec-note All frames consist of a header (7 octets), a payload of arbitrary size, and a 'frame-end' octet that detects malformed frames:

0      1         3             7                  size+7 size+8
+------+---------+-------------+  +------------+  +-----------+
| type | channel |     size    |  |  payload   |  | frame-end |
+------+---------+-------------+  +------------+  +-----------+
 octet   short         long         size octets       octet

To read a frame, we:

  1. Read the header and check the frame type and channel.
  2. Depending on the frame size, we read the payload
  3. Read the frame-end octet.

type Message

type Message struct {
	ID            uint64
	BodySize      uint64
	DeliveryCount uint32
	Mandatory     bool
	Immediate     bool
	Exchange      string
	RoutingKey    string
	ConfirmMeta   *ConfirmMeta
	Header        *ContentHeader
	Body          []*Frame
}

Message represents amqp-message and meta-data

func NewMessage

func NewMessage(method *BasicPublish) *Message

NewMessage returns new message instance

func (*Message) Append

func (m *Message) Append(body *Frame)

Append appends new body-frame into message and increase bodySize

func (*Message) GenerateSeq

func (m *Message) GenerateSeq()

GenerateSeq returns next message ID

func (*Message) IsPersistent

func (m *Message) IsPersistent() bool

IsPersistent check if message should be persisted

func (*Message) Marshal

func (m *Message) Marshal(protoVersion string) (data []byte, err error)

Marshal converts message into bytes to store into db

func (*Message) Unmarshal

func (m *Message) Unmarshal(buffer []byte, protoVersion string) (err error)

Unmarshal restore message entity from bytes

type Method

type Method interface {
	Name() string
	FrameType() byte
	ClassIdentifier() uint16
	MethodIdentifier() uint16
	Read(reader io.Reader, protoVersion string) (err error)
	Write(writer io.Writer, protoVersion string) (err error)
	Sync() bool
}

Method represents base method interface

func ReadMethod

func ReadMethod(reader io.Reader, protoVersion string) (Method, error)

ReadMethod reads method from frame's payload

Method frames carry the high-level protocol commands (which we call "methods"). One method frame carries one command. The method frame payload has this format:

0          2           4
+----------+-----------+-------------- - -
| class-id | method-id | arguments...
+----------+-----------+-------------- - -
   short      short    ...

type QueueBind

type QueueBind struct {
	Reserved1  uint16
	Queue      string
	Exchange   string
	RoutingKey string
	NoWait     bool
	Arguments  *Table
}

QueueBind This method binds a queue to an exchange. Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.

func (*QueueBind) ClassIdentifier

func (method *QueueBind) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueBind) FrameType

func (method *QueueBind) FrameType() byte

FrameType returns method frame type

func (*QueueBind) MethodIdentifier

func (method *QueueBind) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueBind) Name

func (method *QueueBind) Name() string

Name returns method name as string, usefully for logging

func (*QueueBind) Read

func (method *QueueBind) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueBind) Sync

func (method *QueueBind) Sync() bool

Sync is method should me sent synchronous

func (*QueueBind) Write

func (method *QueueBind) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueueBindOk

type QueueBindOk struct {
}

QueueBindOk This method confirms that the bind was successful.

func (*QueueBindOk) ClassIdentifier

func (method *QueueBindOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueBindOk) FrameType

func (method *QueueBindOk) FrameType() byte

FrameType returns method frame type

func (*QueueBindOk) MethodIdentifier

func (method *QueueBindOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueBindOk) Name

func (method *QueueBindOk) Name() string

Name returns method name as string, usefully for logging

func (*QueueBindOk) Read

func (method *QueueBindOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueBindOk) Sync

func (method *QueueBindOk) Sync() bool

Sync is method should me sent synchronous

func (*QueueBindOk) Write

func (method *QueueBindOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueueDeclare

type QueueDeclare struct {
	Reserved1  uint16
	Queue      string
	Passive    bool
	Durable    bool
	Exclusive  bool
	AutoDelete bool
	NoWait     bool
	Arguments  *Table
}

QueueDeclare This method creates or checks a queue. When creating a new queue the client can specify various properties that control the durability of the queue and its contents, and the level of sharing for the queue.

func (*QueueDeclare) ClassIdentifier

func (method *QueueDeclare) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueDeclare) FrameType

func (method *QueueDeclare) FrameType() byte

FrameType returns method frame type

func (*QueueDeclare) MethodIdentifier

func (method *QueueDeclare) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueDeclare) Name

func (method *QueueDeclare) Name() string

Name returns method name as string, usefully for logging

func (*QueueDeclare) Read

func (method *QueueDeclare) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueDeclare) Sync

func (method *QueueDeclare) Sync() bool

Sync is method should me sent synchronous

func (*QueueDeclare) Write

func (method *QueueDeclare) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueueDeclareOk

type QueueDeclareOk struct {
	Queue         string
	MessageCount  uint32
	ConsumerCount uint32
}

QueueDeclareOk This method confirms a Declare method and confirms the name of the queue, essential for automatically-named queues.

func (*QueueDeclareOk) ClassIdentifier

func (method *QueueDeclareOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueDeclareOk) FrameType

func (method *QueueDeclareOk) FrameType() byte

FrameType returns method frame type

func (*QueueDeclareOk) MethodIdentifier

func (method *QueueDeclareOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueDeclareOk) Name

func (method *QueueDeclareOk) Name() string

Name returns method name as string, usefully for logging

func (*QueueDeclareOk) Read

func (method *QueueDeclareOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueDeclareOk) Sync

func (method *QueueDeclareOk) Sync() bool

Sync is method should me sent synchronous

func (*QueueDeclareOk) Write

func (method *QueueDeclareOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueueDelete

type QueueDelete struct {
	Reserved1 uint16
	Queue     string
	IfUnused  bool
	IfEmpty   bool
	NoWait    bool
}

QueueDelete This method deletes a queue. When a queue is deleted any pending messages are sent to a dead-letter queue if this is defined in the server configuration, and all consumers on the queue are cancelled.

func (*QueueDelete) ClassIdentifier

func (method *QueueDelete) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueDelete) FrameType

func (method *QueueDelete) FrameType() byte

FrameType returns method frame type

func (*QueueDelete) MethodIdentifier

func (method *QueueDelete) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueDelete) Name

func (method *QueueDelete) Name() string

Name returns method name as string, usefully for logging

func (*QueueDelete) Read

func (method *QueueDelete) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueDelete) Sync

func (method *QueueDelete) Sync() bool

Sync is method should me sent synchronous

func (*QueueDelete) Write

func (method *QueueDelete) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueueDeleteOk

type QueueDeleteOk struct {
	MessageCount uint32
}

QueueDeleteOk This method confirms the deletion of a queue.

func (*QueueDeleteOk) ClassIdentifier

func (method *QueueDeleteOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueDeleteOk) FrameType

func (method *QueueDeleteOk) FrameType() byte

FrameType returns method frame type

func (*QueueDeleteOk) MethodIdentifier

func (method *QueueDeleteOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueDeleteOk) Name

func (method *QueueDeleteOk) Name() string

Name returns method name as string, usefully for logging

func (*QueueDeleteOk) Read

func (method *QueueDeleteOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueDeleteOk) Sync

func (method *QueueDeleteOk) Sync() bool

Sync is method should me sent synchronous

func (*QueueDeleteOk) Write

func (method *QueueDeleteOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueuePurge

type QueuePurge struct {
	Reserved1 uint16
	Queue     string
	NoWait    bool
}

QueuePurge This method removes all messages from a queue which are not awaiting acknowledgment.

func (*QueuePurge) ClassIdentifier

func (method *QueuePurge) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueuePurge) FrameType

func (method *QueuePurge) FrameType() byte

FrameType returns method frame type

func (*QueuePurge) MethodIdentifier

func (method *QueuePurge) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueuePurge) Name

func (method *QueuePurge) Name() string

Name returns method name as string, usefully for logging

func (*QueuePurge) Read

func (method *QueuePurge) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueuePurge) Sync

func (method *QueuePurge) Sync() bool

Sync is method should me sent synchronous

func (*QueuePurge) Write

func (method *QueuePurge) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueuePurgeOk

type QueuePurgeOk struct {
	MessageCount uint32
}

QueuePurgeOk This method confirms the purge of a queue.

func (*QueuePurgeOk) ClassIdentifier

func (method *QueuePurgeOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueuePurgeOk) FrameType

func (method *QueuePurgeOk) FrameType() byte

FrameType returns method frame type

func (*QueuePurgeOk) MethodIdentifier

func (method *QueuePurgeOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueuePurgeOk) Name

func (method *QueuePurgeOk) Name() string

Name returns method name as string, usefully for logging

func (*QueuePurgeOk) Read

func (method *QueuePurgeOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueuePurgeOk) Sync

func (method *QueuePurgeOk) Sync() bool

Sync is method should me sent synchronous

func (*QueuePurgeOk) Write

func (method *QueuePurgeOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueueUnbind

type QueueUnbind struct {
	Reserved1  uint16
	Queue      string
	Exchange   string
	RoutingKey string
	Arguments  *Table
}

QueueUnbind This method unbinds a queue from an exchange.

func (*QueueUnbind) ClassIdentifier

func (method *QueueUnbind) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueUnbind) FrameType

func (method *QueueUnbind) FrameType() byte

FrameType returns method frame type

func (*QueueUnbind) MethodIdentifier

func (method *QueueUnbind) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueUnbind) Name

func (method *QueueUnbind) Name() string

Name returns method name as string, usefully for logging

func (*QueueUnbind) Read

func (method *QueueUnbind) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueUnbind) Sync

func (method *QueueUnbind) Sync() bool

Sync is method should me sent synchronous

func (*QueueUnbind) Write

func (method *QueueUnbind) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type QueueUnbindOk

type QueueUnbindOk struct {
}

QueueUnbindOk This method confirms that the unbind was successful.

func (*QueueUnbindOk) ClassIdentifier

func (method *QueueUnbindOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*QueueUnbindOk) FrameType

func (method *QueueUnbindOk) FrameType() byte

FrameType returns method frame type

func (*QueueUnbindOk) MethodIdentifier

func (method *QueueUnbindOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*QueueUnbindOk) Name

func (method *QueueUnbindOk) Name() string

Name returns method name as string, usefully for logging

func (*QueueUnbindOk) Read

func (method *QueueUnbindOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*QueueUnbindOk) Sync

func (method *QueueUnbindOk) Sync() bool

Sync is method should me sent synchronous

func (*QueueUnbindOk) Write

func (method *QueueUnbindOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type Table

type Table map[string]interface{}

Table - simple amqp-table implementation

func ReadTable

func ReadTable(r io.Reader, protoVersion string) (data *Table, err error)

ReadTable reads amqp table Standard amqp table and rabbitmq table are little different So we have second argument protoVersion to handle that issue

type TxCommit

type TxCommit struct {
}

TxCommit This method commits all message publications and acknowledgments performed in the current transaction. A new transaction starts immediately after a commit.

func (*TxCommit) ClassIdentifier

func (method *TxCommit) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*TxCommit) FrameType

func (method *TxCommit) FrameType() byte

FrameType returns method frame type

func (*TxCommit) MethodIdentifier

func (method *TxCommit) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*TxCommit) Name

func (method *TxCommit) Name() string

Name returns method name as string, usefully for logging

func (*TxCommit) Read

func (method *TxCommit) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*TxCommit) Sync

func (method *TxCommit) Sync() bool

Sync is method should me sent synchronous

func (*TxCommit) Write

func (method *TxCommit) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type TxCommitOk

type TxCommitOk struct {
}

TxCommitOk This method confirms to the client that the commit succeeded. Note that if a commit fails, the server raises a channel exception.

func (*TxCommitOk) ClassIdentifier

func (method *TxCommitOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*TxCommitOk) FrameType

func (method *TxCommitOk) FrameType() byte

FrameType returns method frame type

func (*TxCommitOk) MethodIdentifier

func (method *TxCommitOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*TxCommitOk) Name

func (method *TxCommitOk) Name() string

Name returns method name as string, usefully for logging

func (*TxCommitOk) Read

func (method *TxCommitOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*TxCommitOk) Sync

func (method *TxCommitOk) Sync() bool

Sync is method should me sent synchronous

func (*TxCommitOk) Write

func (method *TxCommitOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type TxRollback

type TxRollback struct {
}

TxRollback This method abandons all message publications and acknowledgments performed in the current transaction. A new transaction starts immediately after a rollback. Note that unacked messages will not be automatically redelivered by rollback; if that is required an explicit recover call should be issued.

func (*TxRollback) ClassIdentifier

func (method *TxRollback) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*TxRollback) FrameType

func (method *TxRollback) FrameType() byte

FrameType returns method frame type

func (*TxRollback) MethodIdentifier

func (method *TxRollback) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*TxRollback) Name

func (method *TxRollback) Name() string

Name returns method name as string, usefully for logging

func (*TxRollback) Read

func (method *TxRollback) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*TxRollback) Sync

func (method *TxRollback) Sync() bool

Sync is method should me sent synchronous

func (*TxRollback) Write

func (method *TxRollback) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type TxRollbackOk

type TxRollbackOk struct {
}

TxRollbackOk This method confirms to the client that the rollback succeeded. Note that if an rollback fails, the server raises a channel exception.

func (*TxRollbackOk) ClassIdentifier

func (method *TxRollbackOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*TxRollbackOk) FrameType

func (method *TxRollbackOk) FrameType() byte

FrameType returns method frame type

func (*TxRollbackOk) MethodIdentifier

func (method *TxRollbackOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*TxRollbackOk) Name

func (method *TxRollbackOk) Name() string

Name returns method name as string, usefully for logging

func (*TxRollbackOk) Read

func (method *TxRollbackOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*TxRollbackOk) Sync

func (method *TxRollbackOk) Sync() bool

Sync is method should me sent synchronous

func (*TxRollbackOk) Write

func (method *TxRollbackOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type TxSelect

type TxSelect struct {
}

TxSelect This method sets the channel to use standard transactions. The client must use this method at least once on a channel before using the Commit or Rollback methods.

func (*TxSelect) ClassIdentifier

func (method *TxSelect) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*TxSelect) FrameType

func (method *TxSelect) FrameType() byte

FrameType returns method frame type

func (*TxSelect) MethodIdentifier

func (method *TxSelect) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*TxSelect) Name

func (method *TxSelect) Name() string

Name returns method name as string, usefully for logging

func (*TxSelect) Read

func (method *TxSelect) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*TxSelect) Sync

func (method *TxSelect) Sync() bool

Sync is method should me sent synchronous

func (*TxSelect) Write

func (method *TxSelect) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

type TxSelectOk

type TxSelectOk struct {
}

TxSelectOk This method confirms to the client that the channel was successfully set to use standard transactions.

func (*TxSelectOk) ClassIdentifier

func (method *TxSelectOk) ClassIdentifier() uint16

ClassIdentifier returns method classID

func (*TxSelectOk) FrameType

func (method *TxSelectOk) FrameType() byte

FrameType returns method frame type

func (*TxSelectOk) MethodIdentifier

func (method *TxSelectOk) MethodIdentifier() uint16

MethodIdentifier returns method methodID

func (*TxSelectOk) Name

func (method *TxSelectOk) Name() string

Name returns method name as string, usefully for logging

func (*TxSelectOk) Read

func (method *TxSelectOk) Read(reader io.Reader, protoVersion string) (err error)

Read method from io reader

func (*TxSelectOk) Sync

func (method *TxSelectOk) Sync() bool

Sync is method should me sent synchronous

func (*TxSelectOk) Write

func (method *TxSelectOk) Write(writer io.Writer, protoVersion string) (err error)

Write method from io reader

Jump to

Keyboard shortcuts

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