Documentation ¶
Index ¶
- Constants
- func EncodeResponseCode(code uint16) uint16
- func ExtractCommandCode(code uint16) uint16
- func WriteCommand[T CommandWrite](request T, writer *bufio.Writer) error
- func WriteCommandWithHeader[T CommandWrite](request T, writer *bufio.Writer) error
- func WriteMany(writer io.Writer, args ...any) (int, error)
- type Broker
- type ChunkResponse
- type CloseRequest
- func (c *CloseRequest) ClosingCode() uint16
- func (c *CloseRequest) ClosingReason() string
- func (c *CloseRequest) CorrelationId() uint32
- func (c *CloseRequest) Key() uint16
- func (c *CloseRequest) MaxVersion() int16
- func (c *CloseRequest) MinVersion() int16
- func (c *CloseRequest) Read(reader *bufio.Reader) error
- func (c *CloseRequest) SetCorrelationId(correlationId uint32)
- func (c *CloseRequest) SizeNeeded() int
- func (c *CloseRequest) UnmarshalBinary(data []byte) error
- func (c *CloseRequest) Version() int16
- func (c *CloseRequest) Write(writer *bufio.Writer) (int, error)
- type CommandRead
- type CommandWrite
- type Connecter
- type Connection
- type ConsumerUpdateQuery
- func (c *ConsumerUpdateQuery) Active() uint8
- func (c *ConsumerUpdateQuery) CorrelationId() uint32
- func (c *ConsumerUpdateQuery) Key() uint16
- func (c *ConsumerUpdateQuery) MarshalBinary() (data []byte, err error)
- func (c *ConsumerUpdateQuery) MaxVersion() int16
- func (c *ConsumerUpdateQuery) MinVersion() int16
- func (c *ConsumerUpdateQuery) Read(rd *bufio.Reader) error
- func (c *ConsumerUpdateQuery) ResponseCode() uint16
- func (c *ConsumerUpdateQuery) SetCorrelationId(id uint32)
- func (c *ConsumerUpdateQuery) SubscriptionId() uint8
- type ConsumerUpdateResponse
- func (c *ConsumerUpdateResponse) CorrelationId() uint32
- func (c *ConsumerUpdateResponse) Key() uint16
- func (c *ConsumerUpdateResponse) Offset() uint64
- func (c *ConsumerUpdateResponse) OffsetType() uint16
- func (c *ConsumerUpdateResponse) ResponseCode() uint16
- func (c *ConsumerUpdateResponse) SizeNeeded() int
- func (c *ConsumerUpdateResponse) UnmarshalBinary(data []byte) error
- func (c *ConsumerUpdateResponse) Version() int16
- func (c *ConsumerUpdateResponse) Write(w *bufio.Writer) (int, error)
- type CreateRequest
- func (c *CreateRequest) Arguments() map[string]string
- func (c *CreateRequest) CorrelationId() uint32
- func (c *CreateRequest) Key() uint16
- func (c *CreateRequest) SetCorrelationId(id uint32)
- func (c *CreateRequest) SizeNeeded() int
- func (c *CreateRequest) Stream() string
- func (c *CreateRequest) UnmarshalBinary(data []byte) error
- func (c *CreateRequest) Version() int16
- func (c *CreateRequest) Write(writer *bufio.Writer) (int, error)
- type CreditRequest
- func (c *CreditRequest) Credit() uint16
- func (c *CreditRequest) Key() uint16
- func (c *CreditRequest) SizeNeeded() int
- func (c *CreditRequest) SubscriptionId() uint8
- func (c *CreditRequest) UnmarshalBinary(data []byte) error
- func (c *CreditRequest) Version() int16
- func (c *CreditRequest) Write(w *bufio.Writer) (int, error)
- type CreditResponse
- type DeclarePublisherRequest
- func (c *DeclarePublisherRequest) CorrelationId() uint32
- func (c *DeclarePublisherRequest) Key() uint16
- func (c *DeclarePublisherRequest) PublisherId() uint8
- func (c *DeclarePublisherRequest) Reference() string
- func (c *DeclarePublisherRequest) SetCorrelationId(id uint32)
- func (c *DeclarePublisherRequest) SizeNeeded() int
- func (c *DeclarePublisherRequest) Stream() string
- func (c *DeclarePublisherRequest) UnmarshalBinary(data []byte) error
- func (c *DeclarePublisherRequest) Version() int16
- func (c *DeclarePublisherRequest) Write(writer *bufio.Writer) (int, error)
- type DeletePublisherRequest
- func (c *DeletePublisherRequest) CorrelationId() uint32
- func (c *DeletePublisherRequest) Key() uint16
- func (c *DeletePublisherRequest) PublisherId() uint8
- func (c *DeletePublisherRequest) SetCorrelationId(id uint32)
- func (c *DeletePublisherRequest) SizeNeeded() int
- func (c *DeletePublisherRequest) UnmarshalBinary(data []byte) error
- func (c *DeletePublisherRequest) Version() int16
- func (c *DeletePublisherRequest) Write(writer *bufio.Writer) (int, error)
- type DeleteRequest
- func (c *DeleteRequest) CorrelationId() uint32
- func (c *DeleteRequest) Key() uint16
- func (c *DeleteRequest) SetCorrelationId(id uint32)
- func (c *DeleteRequest) SizeNeeded() int
- func (c *DeleteRequest) Stream() string
- func (c *DeleteRequest) UnmarshalBinary(data []byte) error
- func (c *DeleteRequest) Version() int16
- func (c *DeleteRequest) Write(writer *bufio.Writer) (int, error)
- type ExchangeCommandVersionsRequest
- func (e *ExchangeCommandVersionsRequest) CorrelationId() uint32
- func (e *ExchangeCommandVersionsRequest) Key() uint16
- func (e *ExchangeCommandVersionsRequest) SetCorrelationId(id uint32)
- func (e *ExchangeCommandVersionsRequest) SizeNeeded() int
- func (e *ExchangeCommandVersionsRequest) UnmarshalBinary(data []byte) error
- func (e *ExchangeCommandVersionsRequest) Version() int16
- func (e *ExchangeCommandVersionsRequest) Write(w *bufio.Writer) (int, error)
- type ExchangeCommandVersionsResponse
- type Header
- func (h *Header) Command() uint16
- func (h *Header) Length() int
- func (h *Header) MarshalBinary() (data []byte, err error)
- func (h *Header) Read(reader io.Reader) error
- func (h *Header) UnmarshalBinary(data []byte) error
- func (h *Header) Version() int16
- func (h *Header) Write(writer io.Writer) (int, error)
- type Heartbeat
- type MetadataQuery
- func (m *MetadataQuery) CorrelationId() uint32
- func (m *MetadataQuery) Key() uint16
- func (m *MetadataQuery) SetCorrelationId(id uint32)
- func (m *MetadataQuery) SizeNeeded() int
- func (m *MetadataQuery) Streams() []string
- func (m *MetadataQuery) UnmarshalBinary(data []byte) error
- func (m *MetadataQuery) Version() int16
- func (m *MetadataQuery) Write(w *bufio.Writer) (int, error)
- type MetadataResponse
- type MetadataUpdateResponse
- func (m *MetadataUpdateResponse) Code() uint16
- func (m *MetadataUpdateResponse) Key() uint16
- func (m *MetadataUpdateResponse) MarshalBinary() (data []byte, err error)
- func (m *MetadataUpdateResponse) MaxVersion() int16
- func (m *MetadataUpdateResponse) MinVersion() int16
- func (m *MetadataUpdateResponse) Read(rd *bufio.Reader) error
- func (m *MetadataUpdateResponse) Stream() string
- type OffsetSpecification
- type OpenRequest
- type OpenResponse
- type PartitionsQuery
- func (p *PartitionsQuery) CorrelationId() uint32
- func (p *PartitionsQuery) Key() uint16
- func (p *PartitionsQuery) SetCorrelationId(id uint32)
- func (p *PartitionsQuery) SizeNeeded() int
- func (p *PartitionsQuery) SuperStream() string
- func (p *PartitionsQuery) UnmarshalBinary(data []byte) error
- func (p *PartitionsQuery) Version() int16
- func (p *PartitionsQuery) Write(writer *bufio.Writer) (int, error)
- type PartitionsResponse
- type PeerPropertiesRequest
- func (p *PeerPropertiesRequest) CorrelationId() uint32
- func (p *PeerPropertiesRequest) Key() uint16
- func (p *PeerPropertiesRequest) SetCorrelationId(id uint32)
- func (p *PeerPropertiesRequest) SizeNeeded() int
- func (p *PeerPropertiesRequest) Version() int16
- func (p *PeerPropertiesRequest) Write(writer *bufio.Writer) (int, error)
- type PeerPropertiesResponse
- type PublishConfirmResponse
- func (p *PublishConfirmResponse) Key() uint16
- func (p *PublishConfirmResponse) MarshalBinary() (data []byte, err error)
- func (p *PublishConfirmResponse) MaxVersion() int16
- func (p *PublishConfirmResponse) MinVersion() int16
- func (p *PublishConfirmResponse) PublisherID() uint8
- func (p *PublishConfirmResponse) PublishingIds() []uint64
- func (p *PublishConfirmResponse) Read(reader *bufio.Reader) error
- type PublishErrorResponse
- func (p *PublishErrorResponse) Key() uint16
- func (p *PublishErrorResponse) MarshalBinary() (data []byte, err error)
- func (p *PublishErrorResponse) MaxVersion() int16
- func (p *PublishErrorResponse) MinVersion() int16
- func (p *PublishErrorResponse) PublishErrors() []PublishingError
- func (p *PublishErrorResponse) PublisherId() uint8
- func (p *PublishErrorResponse) Read(rd *bufio.Reader) error
- type PublishRequest
- type PublishingError
- type QueryOffsetRequest
- func (c *QueryOffsetRequest) ConsumerReference() string
- func (c *QueryOffsetRequest) CorrelationId() uint32
- func (c *QueryOffsetRequest) Key() uint16
- func (c *QueryOffsetRequest) SetCorrelationId(id uint32)
- func (c *QueryOffsetRequest) SizeNeeded() int
- func (c *QueryOffsetRequest) Stream() string
- func (c *QueryOffsetRequest) UnmarshalBinary(data []byte) error
- func (c *QueryOffsetRequest) Version() int16
- func (c *QueryOffsetRequest) Write(writer *bufio.Writer) (int, error)
- type QueryOffsetResponse
- func (c *QueryOffsetResponse) CorrelationId() uint32
- func (c *QueryOffsetResponse) MarshalBinary() ([]byte, error)
- func (c *QueryOffsetResponse) Offset() uint64
- func (c *QueryOffsetResponse) Read(reader *bufio.Reader) error
- func (c *QueryOffsetResponse) ResponseCode() uint16
- func (c *QueryOffsetResponse) UnmarshalBinary(data []byte) error
- type QueryPublisherSequenceRequest
- func (q *QueryPublisherSequenceRequest) CorrelationId() uint32
- func (q *QueryPublisherSequenceRequest) Key() uint16
- func (q *QueryPublisherSequenceRequest) PublisherReference() string
- func (q *QueryPublisherSequenceRequest) SetCorrelationId(id uint32)
- func (q *QueryPublisherSequenceRequest) SizeNeeded() int
- func (q *QueryPublisherSequenceRequest) Stream() string
- func (q *QueryPublisherSequenceRequest) UnmarshalBinary(data []byte) error
- func (q *QueryPublisherSequenceRequest) Version() int16
- func (q *QueryPublisherSequenceRequest) Write(writer *bufio.Writer) (int, error)
- type QueryPublisherSequenceResponse
- func (qr *QueryPublisherSequenceResponse) CorrelationId() uint32
- func (qr *QueryPublisherSequenceResponse) MarshalBinary() (data []byte, err error)
- func (qr *QueryPublisherSequenceResponse) Read(reader *bufio.Reader) error
- func (qr *QueryPublisherSequenceResponse) ResponseCode() uint16
- func (qr *QueryPublisherSequenceResponse) Sequence() uint64
- type RouteQuery
- func (r *RouteQuery) CorrelationId() uint32
- func (r *RouteQuery) Key() uint16
- func (r *RouteQuery) RoutingKey() string
- func (r *RouteQuery) SetCorrelationId(id uint32)
- func (r *RouteQuery) SizeNeeded() int
- func (r *RouteQuery) SuperStream() string
- func (r *RouteQuery) UnmarshalBinary(data []byte) error
- func (r *RouteQuery) Version() int16
- func (r *RouteQuery) Write(writer *bufio.Writer) (int, error)
- type RouteResponse
- type SaslAuthenticateRequest
- func (s *SaslAuthenticateRequest) CorrelationId() uint32
- func (s *SaslAuthenticateRequest) Key() uint16
- func (s *SaslAuthenticateRequest) SetChallengeResponse(challengeEncode encoding.BinaryMarshaler) error
- func (s *SaslAuthenticateRequest) SetCorrelationId(id uint32)
- func (s *SaslAuthenticateRequest) SizeNeeded() int
- func (s *SaslAuthenticateRequest) Version() int16
- func (s *SaslAuthenticateRequest) Write(writer *bufio.Writer) (int, error)
- type SaslAuthenticateResponse
- type SaslHandshakeRequest
- func (s *SaslHandshakeRequest) CorrelationId() uint32
- func (s *SaslHandshakeRequest) Key() uint16
- func (s *SaslHandshakeRequest) SetCorrelationId(id uint32)
- func (s *SaslHandshakeRequest) SizeNeeded() int
- func (s *SaslHandshakeRequest) Version() int16
- func (s *SaslHandshakeRequest) Write(writer *bufio.Writer) (int, error)
- type SaslHandshakeResponse
- type SaslPlainMechanism
- type SimpleResponse
- type StoreOffsetRequest
- func (s *StoreOffsetRequest) Key() uint16
- func (s *StoreOffsetRequest) Offset() uint64
- func (s *StoreOffsetRequest) Reference() string
- func (s *StoreOffsetRequest) SizeNeeded() int
- func (s *StoreOffsetRequest) Stream() string
- func (s *StoreOffsetRequest) UnmarshalBinary(data []byte) error
- func (s *StoreOffsetRequest) Version() int16
- func (s *StoreOffsetRequest) Write(writer *bufio.Writer) (int, error)
- type StreamMetadata
- type StreamStatsRequest
- func (s *StreamStatsRequest) CorrelationId() uint32
- func (s *StreamStatsRequest) Key() uint16
- func (s *StreamStatsRequest) SetCorrelationId(id uint32)
- func (s *StreamStatsRequest) SizeNeeded() int
- func (s *StreamStatsRequest) Stream() string
- func (s *StreamStatsRequest) UnmarshalBinary(data []byte) error
- func (s *StreamStatsRequest) Version() int16
- func (s *StreamStatsRequest) Write(writer *bufio.Writer) (int, error)
- type StreamStatsResponse
- type SubBatchPublishRequest
- type SubscribeRequest
- func (s *SubscribeRequest) CorrelationId() uint32
- func (s *SubscribeRequest) Credit() uint16
- func (s *SubscribeRequest) Key() uint16
- func (s *SubscribeRequest) Offset() uint64
- func (s *SubscribeRequest) OffsetType() uint16
- func (s *SubscribeRequest) Properties() map[string]string
- func (s *SubscribeRequest) SetCorrelationId(id uint32)
- func (s *SubscribeRequest) SizeNeeded() int
- func (s *SubscribeRequest) Stream() string
- func (s *SubscribeRequest) SubscriptionId() uint8
- func (s *SubscribeRequest) UnmarshalBinary(data []byte) error
- func (s *SubscribeRequest) Version() int16
- func (s *SubscribeRequest) Write(writer *bufio.Writer) (int, error)
- type SyncCommandRead
- type SyncCommandWrite
- type TuneRequest
- type TuneResponse
- type UnsubscribeRequest
- func (u *UnsubscribeRequest) CorrelationId() uint32
- func (u *UnsubscribeRequest) Key() uint16
- func (u *UnsubscribeRequest) SetCorrelationId(id uint32)
- func (u *UnsubscribeRequest) SizeNeeded() int
- func (u *UnsubscribeRequest) SubscriptionId() uint8
- func (u *UnsubscribeRequest) UnmarshalBinary(data []byte) error
- func (u *UnsubscribeRequest) Version() int16
- func (u *UnsubscribeRequest) Write(wr *bufio.Writer) (int, error)
Constants ¶
const ( CommandDeclarePublisher uint16 = 0x0001 // 1 CommandPublish uint16 = 0x0002 // 2 CommandPublishConfirm uint16 = 0x0003 // 3 CommandPublishError uint16 = 0x0004 // 4 CommandQueryPublisherSequence uint16 = 0x0005 // 5 CommandDeletePublisher uint16 = 0x0006 // 6 CommandSubscribe uint16 = 0x0007 // 7 CommandDeliver uint16 = 0x0008 // 8 CommandCredit uint16 = 0x0009 // 9 CommandStoreOffset uint16 = 0x000a // 10 CommandQueryOffset uint16 = 0x000b // 11 CommandUnsubscribe uint16 = 0x000c // 12 CommandCreate uint16 = 0x000d // 13 CommandDelete uint16 = 0x000e // 14 CommandMetadata uint16 = 0x000f // 15 CommandMetadataUpdate uint16 = 0x0010 // 16 CommandPeerProperties uint16 = 0x0011 // 17 CommandSaslHandshake uint16 = 0x0012 // 18 CommandSaslAuthenticate uint16 = 0x0013 // 19 CommandTune uint16 = 0x0014 // 20 CommandOpen uint16 = 0x0015 // 21 CommandClose uint16 = 0x0016 // 22 CommandHeartbeat uint16 = 0x0017 // 23 CommandRoute uint16 = 0x0018 // 24 CommandPartitions uint16 = 0x0019 // 25 CommandConsumerUpdateQuery uint16 = 0x001a // 26 CommandExchangeCommandVersions uint16 = 0x001b // 27 CommandStreamStats uint16 = 0x001c // 28 )
command IDs
const ( CommandDeclarePublisherResponse uint16 = 0x8001 CommandQueryPublisherSequenceResponse uint16 = 0x8005 CommandDeletePublisherResponse uint16 = 0x8006 CommandSubscribeResponse uint16 = 0x8007 CommandCreditResponse uint16 = 0x8009 CommandQueryOffsetResponse uint16 = 0x800b CommandUnsubscribeResponse uint16 = 0x800c CommandCreateResponse uint16 = 0x800d CommandDeleteResponse uint16 = 0x800e CommandMetadataResponse uint16 = 0x800f CommandPeerPropertiesResponse uint16 = 0x8011 CommandSaslHandshakeResponse uint16 = 0x8012 CommandSaslAuthenticateResponse uint16 = 0x8013 CommandTuneResponse uint16 = 0x8014 CommandOpenResponse uint16 = 0x8015 CommandCloseResponse uint16 = 0x8016 CommandRouteResponse uint16 = 0x8018 CommandPartitionsResponse uint16 = 0x8019 CommandConsumerUpdateResponse uint16 = 0x801a CommandExchangeCommandVersionsResponse uint16 = 0x801b CommandStreamStatsResponse uint16 = 0x801c )
const ( Version1 int16 = iota + 1 Version2 )
Variables ¶
This section is empty.
Functions ¶
func EncodeResponseCode ¶
func ExtractCommandCode ¶
func WriteCommand ¶
func WriteCommand[T CommandWrite](request T, writer *bufio.Writer) error
func WriteCommandWithHeader ¶
func WriteCommandWithHeader[T CommandWrite](request T, writer *bufio.Writer) error
WriteCommandWithHeader sends the Commands to the server with included header. The commands are sent in the following order: 1. Header 2. Command 3. Flush The flush is required to make sure that the commands are sent to the server. WriteCommandWithHeader doesn't care about the response.
Types ¶
type ChunkResponse ¶
type ChunkResponse struct { SubscriptionId uint8 CommittedChunkId uint64 //OsirisChunk => MagicVersion NumEntries NumRecords Epoch ChunkFirstOffset ChunkCrc DataLength Messages MagicVersion int8 ChunkType int8 // 0: user, 1: tracking delta, 2: tracking snapshot NumEntries uint16 NumRecords uint32 Timestamp int64 // erlang system time in milliseconds, since epoch Epoch uint64 ChunkFirstOffset uint64 ChunkCrc int32 DataLength uint32 TrailerLength uint32 Reserved uint32 // unused 4 bytes Messages []byte // raw bytes of the messages. The protocol here defines the messages. }
func (*ChunkResponse) Key ¶
func (c *ChunkResponse) Key() uint16
func (*ChunkResponse) MarshalBinary ¶
func (c *ChunkResponse) MarshalBinary() (data []byte, err error)
func (*ChunkResponse) MaxVersion ¶
func (c *ChunkResponse) MaxVersion() int16
func (*ChunkResponse) MinVersion ¶
func (c *ChunkResponse) MinVersion() int16
type CloseRequest ¶
type CloseRequest struct {
// contains filtered or unexported fields
}
CloseRequest can be initiated from the Client or from the Server. This struct must implement both internal.SyncCommandRead and internal.SyncCommandWrite
func NewCloseRequest ¶
func NewCloseRequest(closingCode uint16, closingReason string) *CloseRequest
func (*CloseRequest) ClosingCode ¶
func (c *CloseRequest) ClosingCode() uint16
func (*CloseRequest) ClosingReason ¶
func (c *CloseRequest) ClosingReason() string
func (*CloseRequest) CorrelationId ¶
func (c *CloseRequest) CorrelationId() uint32
func (*CloseRequest) Key ¶
func (c *CloseRequest) Key() uint16
func (*CloseRequest) MaxVersion ¶
func (c *CloseRequest) MaxVersion() int16
func (*CloseRequest) MinVersion ¶
func (c *CloseRequest) MinVersion() int16
func (*CloseRequest) SetCorrelationId ¶
func (c *CloseRequest) SetCorrelationId(correlationId uint32)
func (*CloseRequest) SizeNeeded ¶
func (c *CloseRequest) SizeNeeded() int
func (*CloseRequest) UnmarshalBinary ¶
func (c *CloseRequest) UnmarshalBinary(data []byte) error
func (*CloseRequest) Version ¶
func (c *CloseRequest) Version() int16
type CommandRead ¶
CommandRead is the interface that wraps the Read method. Read reads the command from the reader. nto related to any correlation ID. for example publish confirm
type CommandWrite ¶
type CommandWrite interface { Write(writer *bufio.Writer) (int, error) Key() uint16 // SizeNeeded must return the size required to encode this CommandWrite // plus the size of the Header. The size of the Header is always 4 bytes SizeNeeded() int Version() int16 }
CommandWrite is the interface that wraps the Write method. The interface is implemented by all commands that are sent to the server. and that have no responses. Fire and forget style Command like: PublishRequest and Store Offset.
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(connection net.Conn) *Connection
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) GetReader ¶
func (c *Connection) GetReader() *bufio.Reader
func (*Connection) GetWriter ¶
func (c *Connection) GetWriter() *bufio.Writer
func (*Connection) SetDeadline ¶
func (c *Connection) SetDeadline(t time.Time) error
type ConsumerUpdateQuery ¶
type ConsumerUpdateQuery struct {
// contains filtered or unexported fields
}
ConsumerUpdateQuery is a frame received by the client to change the active state of a consumer. the consumer is identified by the subscriptionId.
func NewConsumerUpdateQuery ¶
func NewConsumerUpdateQuery(correlationId uint32, subscriptionId, active uint8) *ConsumerUpdateQuery
func (*ConsumerUpdateQuery) Active ¶
func (c *ConsumerUpdateQuery) Active() uint8
func (*ConsumerUpdateQuery) CorrelationId ¶
func (c *ConsumerUpdateQuery) CorrelationId() uint32
func (*ConsumerUpdateQuery) Key ¶
func (c *ConsumerUpdateQuery) Key() uint16
func (*ConsumerUpdateQuery) MarshalBinary ¶
func (c *ConsumerUpdateQuery) MarshalBinary() (data []byte, err error)
func (*ConsumerUpdateQuery) MaxVersion ¶
func (c *ConsumerUpdateQuery) MaxVersion() int16
func (*ConsumerUpdateQuery) MinVersion ¶
func (c *ConsumerUpdateQuery) MinVersion() int16
func (*ConsumerUpdateQuery) ResponseCode ¶
func (c *ConsumerUpdateQuery) ResponseCode() uint16
func (*ConsumerUpdateQuery) SetCorrelationId ¶
func (c *ConsumerUpdateQuery) SetCorrelationId(id uint32)
func (*ConsumerUpdateQuery) SubscriptionId ¶
func (c *ConsumerUpdateQuery) SubscriptionId() uint8
type ConsumerUpdateResponse ¶
type ConsumerUpdateResponse struct {
// contains filtered or unexported fields
}
ConsumerUpdateResponse is a frame sent by the client to in response to an active state change of a consumer. The offsetType and offset are calculated by the client.
func NewConsumerUpdateResponse ¶
func NewConsumerUpdateResponse(correlationId uint32, responseCode, offsetType uint16, offset uint64) *ConsumerUpdateResponse
func (*ConsumerUpdateResponse) CorrelationId ¶
func (c *ConsumerUpdateResponse) CorrelationId() uint32
func (*ConsumerUpdateResponse) Key ¶
func (c *ConsumerUpdateResponse) Key() uint16
func (*ConsumerUpdateResponse) Offset ¶
func (c *ConsumerUpdateResponse) Offset() uint64
func (*ConsumerUpdateResponse) OffsetType ¶
func (c *ConsumerUpdateResponse) OffsetType() uint16
func (*ConsumerUpdateResponse) ResponseCode ¶
func (c *ConsumerUpdateResponse) ResponseCode() uint16
func (*ConsumerUpdateResponse) SizeNeeded ¶
func (c *ConsumerUpdateResponse) SizeNeeded() int
func (*ConsumerUpdateResponse) UnmarshalBinary ¶
func (c *ConsumerUpdateResponse) UnmarshalBinary(data []byte) error
func (*ConsumerUpdateResponse) Version ¶
func (c *ConsumerUpdateResponse) Version() int16
type CreateRequest ¶
type CreateRequest struct {
// contains filtered or unexported fields
}
func NewCreateRequest ¶
func NewCreateRequest(stream string, configuration map[string]string) *CreateRequest
func (*CreateRequest) Arguments ¶
func (c *CreateRequest) Arguments() map[string]string
func (*CreateRequest) CorrelationId ¶
func (c *CreateRequest) CorrelationId() uint32
func (*CreateRequest) Key ¶
func (c *CreateRequest) Key() uint16
func (*CreateRequest) SetCorrelationId ¶
func (c *CreateRequest) SetCorrelationId(id uint32)
func (*CreateRequest) SizeNeeded ¶
func (c *CreateRequest) SizeNeeded() int
func (*CreateRequest) Stream ¶
func (c *CreateRequest) Stream() string
func (*CreateRequest) UnmarshalBinary ¶
func (c *CreateRequest) UnmarshalBinary(data []byte) error
func (*CreateRequest) Version ¶
func (c *CreateRequest) Version() int16
type CreditRequest ¶
type CreditRequest struct {
// contains filtered or unexported fields
}
func NewCreditRequest ¶
func NewCreditRequest(subscriptionId uint8, credit uint16) *CreditRequest
func (*CreditRequest) Credit ¶
func (c *CreditRequest) Credit() uint16
func (*CreditRequest) Key ¶
func (c *CreditRequest) Key() uint16
func (*CreditRequest) SizeNeeded ¶
func (c *CreditRequest) SizeNeeded() int
func (*CreditRequest) SubscriptionId ¶
func (c *CreditRequest) SubscriptionId() uint8
func (*CreditRequest) UnmarshalBinary ¶
func (c *CreditRequest) UnmarshalBinary(data []byte) error
func (*CreditRequest) Version ¶
func (c *CreditRequest) Version() int16
type CreditResponse ¶
type CreditResponse struct {
// contains filtered or unexported fields
}
func NewCreditResponse ¶
func NewCreditResponse(responseCode uint16, subscriptionId uint8) *CreditResponse
func (*CreditResponse) MarshalBinary ¶
func (c *CreditResponse) MarshalBinary() (data []byte, err error)
func (*CreditResponse) ResponseCode ¶
func (c *CreditResponse) ResponseCode() uint16
func (*CreditResponse) SubscriptionId ¶
func (c *CreditResponse) SubscriptionId() uint8
type DeclarePublisherRequest ¶
type DeclarePublisherRequest struct {
// contains filtered or unexported fields
}
func NewDeclarePublisherRequest ¶
func NewDeclarePublisherRequest(publisherId uint8, publisherReference string, stream string) *DeclarePublisherRequest
func (*DeclarePublisherRequest) CorrelationId ¶
func (c *DeclarePublisherRequest) CorrelationId() uint32
func (*DeclarePublisherRequest) Key ¶
func (c *DeclarePublisherRequest) Key() uint16
func (*DeclarePublisherRequest) PublisherId ¶
func (c *DeclarePublisherRequest) PublisherId() uint8
func (*DeclarePublisherRequest) Reference ¶
func (c *DeclarePublisherRequest) Reference() string
func (*DeclarePublisherRequest) SetCorrelationId ¶
func (c *DeclarePublisherRequest) SetCorrelationId(id uint32)
func (*DeclarePublisherRequest) SizeNeeded ¶
func (c *DeclarePublisherRequest) SizeNeeded() int
func (*DeclarePublisherRequest) Stream ¶
func (c *DeclarePublisherRequest) Stream() string
func (*DeclarePublisherRequest) UnmarshalBinary ¶
func (c *DeclarePublisherRequest) UnmarshalBinary(data []byte) error
func (*DeclarePublisherRequest) Version ¶
func (c *DeclarePublisherRequest) Version() int16
type DeletePublisherRequest ¶
type DeletePublisherRequest struct {
// contains filtered or unexported fields
}
func NewDeletePublisherRequest ¶
func NewDeletePublisherRequest(publisherId uint8) *DeletePublisherRequest
func (*DeletePublisherRequest) CorrelationId ¶
func (c *DeletePublisherRequest) CorrelationId() uint32
func (*DeletePublisherRequest) Key ¶
func (c *DeletePublisherRequest) Key() uint16
func (*DeletePublisherRequest) PublisherId ¶
func (c *DeletePublisherRequest) PublisherId() uint8
func (*DeletePublisherRequest) SetCorrelationId ¶
func (c *DeletePublisherRequest) SetCorrelationId(id uint32)
func (*DeletePublisherRequest) SizeNeeded ¶
func (c *DeletePublisherRequest) SizeNeeded() int
func (*DeletePublisherRequest) UnmarshalBinary ¶
func (c *DeletePublisherRequest) UnmarshalBinary(data []byte) error
func (*DeletePublisherRequest) Version ¶
func (c *DeletePublisherRequest) Version() int16
type DeleteRequest ¶
type DeleteRequest struct {
// contains filtered or unexported fields
}
func NewDeleteRequest ¶
func NewDeleteRequest(stream string) *DeleteRequest
func (*DeleteRequest) CorrelationId ¶
func (c *DeleteRequest) CorrelationId() uint32
func (*DeleteRequest) Key ¶
func (c *DeleteRequest) Key() uint16
func (*DeleteRequest) SetCorrelationId ¶
func (c *DeleteRequest) SetCorrelationId(id uint32)
func (*DeleteRequest) SizeNeeded ¶
func (c *DeleteRequest) SizeNeeded() int
func (*DeleteRequest) Stream ¶
func (c *DeleteRequest) Stream() string
func (*DeleteRequest) UnmarshalBinary ¶
func (c *DeleteRequest) UnmarshalBinary(data []byte) error
func (*DeleteRequest) Version ¶
func (c *DeleteRequest) Version() int16
type ExchangeCommandVersionsRequest ¶
type ExchangeCommandVersionsRequest struct {
// contains filtered or unexported fields
}
func NewExchangeCommandVersionsRequest ¶
func NewExchangeCommandVersionsRequest() *ExchangeCommandVersionsRequest
func NewExchangeCommandVersionsRequestWith ¶
func NewExchangeCommandVersionsRequestWith(correlationId uint32, commands []commandInformer) *ExchangeCommandVersionsRequest
func (*ExchangeCommandVersionsRequest) CorrelationId ¶
func (e *ExchangeCommandVersionsRequest) CorrelationId() uint32
func (*ExchangeCommandVersionsRequest) Key ¶
func (e *ExchangeCommandVersionsRequest) Key() uint16
func (*ExchangeCommandVersionsRequest) SetCorrelationId ¶
func (e *ExchangeCommandVersionsRequest) SetCorrelationId(id uint32)
func (*ExchangeCommandVersionsRequest) SizeNeeded ¶
func (e *ExchangeCommandVersionsRequest) SizeNeeded() int
func (*ExchangeCommandVersionsRequest) UnmarshalBinary ¶
func (e *ExchangeCommandVersionsRequest) UnmarshalBinary(data []byte) error
func (*ExchangeCommandVersionsRequest) Version ¶
func (e *ExchangeCommandVersionsRequest) Version() int16
type ExchangeCommandVersionsResponse ¶
type ExchangeCommandVersionsResponse struct {
// contains filtered or unexported fields
}
ExchangeCommandVersionsResponse is used to decode a response from the server to ExchangeCommandVersionsRequest
func NewExchangeCommandVersionsResponse ¶
func NewExchangeCommandVersionsResponse(id uint32, responseCode uint16, commands ...commandInformer) *ExchangeCommandVersionsResponse
func (*ExchangeCommandVersionsResponse) CorrelationId ¶
func (e *ExchangeCommandVersionsResponse) CorrelationId() uint32
func (*ExchangeCommandVersionsResponse) MarshalBinary ¶
func (e *ExchangeCommandVersionsResponse) MarshalBinary() (data []byte, err error)
func (*ExchangeCommandVersionsResponse) Read ¶
func (e *ExchangeCommandVersionsResponse) Read(r *bufio.Reader) error
func (*ExchangeCommandVersionsResponse) ResponseCode ¶
func (e *ExchangeCommandVersionsResponse) ResponseCode() uint16
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
func NewHeaderRequest ¶
func NewHeaderRequest(command CommandWrite) *Header
func (*Header) Length ¶
Length returns the size required to read this header (excluding the length filed), plus the command content/body.
func (*Header) MarshalBinary ¶
func (*Header) UnmarshalBinary ¶
type Heartbeat ¶
type Heartbeat struct {
// contains filtered or unexported fields
}
func NewHeartbeat ¶
func NewHeartbeat() *Heartbeat
func (*Heartbeat) SizeNeeded ¶
type MetadataQuery ¶
type MetadataQuery struct {
// contains filtered or unexported fields
}
func NewMetadataQuery ¶
func NewMetadataQuery(streams []string) *MetadataQuery
func (*MetadataQuery) CorrelationId ¶
func (m *MetadataQuery) CorrelationId() uint32
func (*MetadataQuery) Key ¶
func (m *MetadataQuery) Key() uint16
func (*MetadataQuery) SetCorrelationId ¶
func (m *MetadataQuery) SetCorrelationId(id uint32)
func (*MetadataQuery) SizeNeeded ¶
func (m *MetadataQuery) SizeNeeded() int
func (*MetadataQuery) Streams ¶
func (m *MetadataQuery) Streams() []string
func (*MetadataQuery) UnmarshalBinary ¶
func (m *MetadataQuery) UnmarshalBinary(data []byte) error
func (*MetadataQuery) Version ¶
func (m *MetadataQuery) Version() int16
type MetadataResponse ¶
type MetadataResponse struct {
// contains filtered or unexported fields
}
func NewMetadataResponse ¶
func NewMetadataResponse(correlationId, port uint32, brokerReference, responseCode, leaderReference uint16, host, streamName string, replicasReferences []uint16, ) *MetadataResponse
func (*MetadataResponse) CorrelationId ¶
func (m *MetadataResponse) CorrelationId() uint32
func (*MetadataResponse) MarshalBinary ¶
func (m *MetadataResponse) MarshalBinary() (data []byte, err error)
func (*MetadataResponse) ResponseCode ¶
func (m *MetadataResponse) ResponseCode() uint16
type MetadataUpdateResponse ¶
type MetadataUpdateResponse struct {
// contains filtered or unexported fields
}
MetadataUpdateResponse contains a code to identify information, and the stream associated with the metadata.
func NewMetadataUpdateResponse ¶
func NewMetadataUpdateResponse(code uint16, stream string) *MetadataUpdateResponse
func (*MetadataUpdateResponse) Code ¶
func (m *MetadataUpdateResponse) Code() uint16
func (*MetadataUpdateResponse) Key ¶
func (m *MetadataUpdateResponse) Key() uint16
func (*MetadataUpdateResponse) MarshalBinary ¶
func (m *MetadataUpdateResponse) MarshalBinary() (data []byte, err error)
func (*MetadataUpdateResponse) MaxVersion ¶
func (m *MetadataUpdateResponse) MaxVersion() int16
func (*MetadataUpdateResponse) MinVersion ¶
func (m *MetadataUpdateResponse) MinVersion() int16
func (*MetadataUpdateResponse) Stream ¶
func (m *MetadataUpdateResponse) Stream() string
type OffsetSpecification ¶
type OffsetSpecification struct {
// contains filtered or unexported fields
}
type OpenRequest ¶
type OpenRequest struct {
// contains filtered or unexported fields
}
func NewOpenRequest ¶
func NewOpenRequest(virtualHost string) *OpenRequest
func (*OpenRequest) CorrelationId ¶
func (o *OpenRequest) CorrelationId() uint32
func (*OpenRequest) Key ¶
func (o *OpenRequest) Key() uint16
func (*OpenRequest) SetCorrelationId ¶
func (o *OpenRequest) SetCorrelationId(correlationId uint32)
func (*OpenRequest) SizeNeeded ¶
func (o *OpenRequest) SizeNeeded() int
func (*OpenRequest) Version ¶
func (o *OpenRequest) Version() int16
type OpenResponse ¶
type OpenResponse struct {
// contains filtered or unexported fields
}
func NewOpenResponseWith ¶
func NewOpenResponseWith(correlationId uint32, responseCode uint16, connectionProperties map[string]string) *OpenResponse
func (*OpenResponse) ConnectionProperties ¶
func (o *OpenResponse) ConnectionProperties() map[string]string
func (*OpenResponse) CorrelationId ¶
func (o *OpenResponse) CorrelationId() uint32
func (*OpenResponse) MarshalBinary ¶
func (o *OpenResponse) MarshalBinary() (data []byte, err error)
func (*OpenResponse) ResponseCode ¶
func (o *OpenResponse) ResponseCode() uint16
type PartitionsQuery ¶
type PartitionsQuery struct {
// contains filtered or unexported fields
}
func NewPartitionsQuery ¶
func NewPartitionsQuery(superStream string) *PartitionsQuery
func (*PartitionsQuery) CorrelationId ¶
func (p *PartitionsQuery) CorrelationId() uint32
func (*PartitionsQuery) Key ¶
func (p *PartitionsQuery) Key() uint16
func (*PartitionsQuery) SetCorrelationId ¶
func (p *PartitionsQuery) SetCorrelationId(id uint32)
func (*PartitionsQuery) SizeNeeded ¶
func (p *PartitionsQuery) SizeNeeded() int
func (*PartitionsQuery) SuperStream ¶
func (p *PartitionsQuery) SuperStream() string
func (*PartitionsQuery) UnmarshalBinary ¶
func (p *PartitionsQuery) UnmarshalBinary(data []byte) error
func (*PartitionsQuery) Version ¶
func (p *PartitionsQuery) Version() int16
type PartitionsResponse ¶
type PartitionsResponse struct {
// contains filtered or unexported fields
}
func NewPartitionsResponse ¶
func NewPartitionsResponse() *PartitionsResponse
func NewPartitionsResponseWith ¶
func NewPartitionsResponseWith(correlationId uint32, responseCode uint16, streams []string) *PartitionsResponse
func (*PartitionsResponse) CorrelationId ¶
func (pr *PartitionsResponse) CorrelationId() uint32
func (*PartitionsResponse) MarshalBinary ¶
func (pr *PartitionsResponse) MarshalBinary() (data []byte, err error)
func (*PartitionsResponse) ResponseCode ¶
func (pr *PartitionsResponse) ResponseCode() uint16
func (*PartitionsResponse) Streams ¶
func (pr *PartitionsResponse) Streams() []string
type PeerPropertiesRequest ¶
type PeerPropertiesRequest struct {
// contains filtered or unexported fields
}
func NewPeerPropertiesRequest ¶
func NewPeerPropertiesRequest(connectionName string) *PeerPropertiesRequest
func (*PeerPropertiesRequest) CorrelationId ¶
func (p *PeerPropertiesRequest) CorrelationId() uint32
func (*PeerPropertiesRequest) Key ¶
func (p *PeerPropertiesRequest) Key() uint16
func (*PeerPropertiesRequest) SetCorrelationId ¶
func (p *PeerPropertiesRequest) SetCorrelationId(id uint32)
func (*PeerPropertiesRequest) SizeNeeded ¶
func (p *PeerPropertiesRequest) SizeNeeded() int
func (*PeerPropertiesRequest) Version ¶
func (p *PeerPropertiesRequest) Version() int16
type PeerPropertiesResponse ¶
type PeerPropertiesResponse struct { ServerProperties map[string]string // contains filtered or unexported fields }
func NewPeerPropertiesResponse ¶
func NewPeerPropertiesResponse() *PeerPropertiesResponse
func NewPeerPropertiesResponseWith ¶
func NewPeerPropertiesResponseWith(correlationId uint32, responseCode uint16, serverProperties map[string]string) *PeerPropertiesResponse
func (*PeerPropertiesResponse) CorrelationId ¶
func (p *PeerPropertiesResponse) CorrelationId() uint32
func (*PeerPropertiesResponse) MarshalBinary ¶
func (p *PeerPropertiesResponse) MarshalBinary() (data []byte, err error)
func (*PeerPropertiesResponse) Read ¶
func (p *PeerPropertiesResponse) Read(reader *bufio.Reader) error
func (*PeerPropertiesResponse) ResponseCode ¶
func (p *PeerPropertiesResponse) ResponseCode() uint16
type PublishConfirmResponse ¶
type PublishConfirmResponse struct {
// contains filtered or unexported fields
}
PublishConfirmResponse is a response that contains a publisher ID and a list of publishing IDs. Publish commands return this type of response. It is used to confirm that the publishing was successful. It is asynchronous and the response could contain a list of publishing IDs.
func NewPublishConfirmResponse ¶
func NewPublishConfirmResponse(publisherID uint8, publishingIds []uint64) *PublishConfirmResponse
func (*PublishConfirmResponse) Key ¶
func (p *PublishConfirmResponse) Key() uint16
func (*PublishConfirmResponse) MarshalBinary ¶
func (p *PublishConfirmResponse) MarshalBinary() (data []byte, err error)
func (*PublishConfirmResponse) MaxVersion ¶
func (p *PublishConfirmResponse) MaxVersion() int16
func (*PublishConfirmResponse) MinVersion ¶
func (p *PublishConfirmResponse) MinVersion() int16
func (*PublishConfirmResponse) PublisherID ¶
func (p *PublishConfirmResponse) PublisherID() uint8
func (*PublishConfirmResponse) PublishingIds ¶
func (p *PublishConfirmResponse) PublishingIds() []uint64
type PublishErrorResponse ¶
type PublishErrorResponse struct {
// contains filtered or unexported fields
}
func NewPublishErrorResponse ¶
func NewPublishErrorResponse(publisherId uint8, publishingErrors ...PublishingError) *PublishErrorResponse
func (*PublishErrorResponse) Key ¶
func (p *PublishErrorResponse) Key() uint16
func (*PublishErrorResponse) MarshalBinary ¶
func (p *PublishErrorResponse) MarshalBinary() (data []byte, err error)
func (*PublishErrorResponse) MaxVersion ¶
func (p *PublishErrorResponse) MaxVersion() int16
func (*PublishErrorResponse) MinVersion ¶
func (p *PublishErrorResponse) MinVersion() int16
func (*PublishErrorResponse) PublishErrors ¶
func (p *PublishErrorResponse) PublishErrors() []PublishingError
func (*PublishErrorResponse) PublisherId ¶
func (p *PublishErrorResponse) PublisherId() uint8
type PublishRequest ¶
type PublishRequest struct {
// contains filtered or unexported fields
}
func NewPublishRequest ¶
func NewPublishRequest(publisherId uint8, messageCount uint32, messages []byte) *PublishRequest
func (*PublishRequest) Key ¶
func (p *PublishRequest) Key() uint16
func (*PublishRequest) SizeNeeded ¶
func (p *PublishRequest) SizeNeeded() int
func (*PublishRequest) Version ¶
func (p *PublishRequest) Version() int16
type PublishingError ¶
type PublishingError struct {
// contains filtered or unexported fields
}
func NewPublishingError ¶
func NewPublishingError(pubId uint64, code uint16) *PublishingError
func (*PublishingError) Code ¶
func (p *PublishingError) Code() uint16
func (*PublishingError) Error ¶
func (p *PublishingError) Error() string
func (*PublishingError) PublishingId ¶
func (p *PublishingError) PublishingId() uint64
type QueryOffsetRequest ¶
type QueryOffsetRequest struct {
// contains filtered or unexported fields
}
QueryOffsetRequest is used to query the offset of a stream for a given consumer reference. ref: https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_stream/docs/PROTOCOL.adoc#queryoffset
func NewQueryOffsetRequest ¶
func NewQueryOffsetRequest(consumerReference string, stream string) *QueryOffsetRequest
func (*QueryOffsetRequest) ConsumerReference ¶
func (c *QueryOffsetRequest) ConsumerReference() string
func (*QueryOffsetRequest) CorrelationId ¶
func (c *QueryOffsetRequest) CorrelationId() uint32
func (*QueryOffsetRequest) Key ¶
func (c *QueryOffsetRequest) Key() uint16
func (*QueryOffsetRequest) SetCorrelationId ¶
func (c *QueryOffsetRequest) SetCorrelationId(id uint32)
func (*QueryOffsetRequest) SizeNeeded ¶
func (c *QueryOffsetRequest) SizeNeeded() int
func (*QueryOffsetRequest) Stream ¶
func (c *QueryOffsetRequest) Stream() string
func (*QueryOffsetRequest) UnmarshalBinary ¶
func (c *QueryOffsetRequest) UnmarshalBinary(data []byte) error
func (*QueryOffsetRequest) Version ¶
func (c *QueryOffsetRequest) Version() int16
type QueryOffsetResponse ¶
type QueryOffsetResponse struct {
// contains filtered or unexported fields
}
func NewQueryOffsetResponse ¶
func NewQueryOffsetResponse() *QueryOffsetResponse
func NewQueryOffsetResponseWith ¶
func NewQueryOffsetResponseWith(correlationId uint32, responseCode uint16, offset uint64) *QueryOffsetResponse
func (*QueryOffsetResponse) CorrelationId ¶
func (c *QueryOffsetResponse) CorrelationId() uint32
func (*QueryOffsetResponse) MarshalBinary ¶
func (c *QueryOffsetResponse) MarshalBinary() ([]byte, error)
func (*QueryOffsetResponse) Offset ¶
func (c *QueryOffsetResponse) Offset() uint64
func (*QueryOffsetResponse) ResponseCode ¶
func (c *QueryOffsetResponse) ResponseCode() uint16
func (*QueryOffsetResponse) UnmarshalBinary ¶
func (c *QueryOffsetResponse) UnmarshalBinary(data []byte) error
type QueryPublisherSequenceRequest ¶
type QueryPublisherSequenceRequest struct {
// contains filtered or unexported fields
}
func NewQueryPublisherSequenceRequest ¶
func NewQueryPublisherSequenceRequest(pubRef, stream string) *QueryPublisherSequenceRequest
func (*QueryPublisherSequenceRequest) CorrelationId ¶
func (q *QueryPublisherSequenceRequest) CorrelationId() uint32
func (*QueryPublisherSequenceRequest) Key ¶
func (q *QueryPublisherSequenceRequest) Key() uint16
func (*QueryPublisherSequenceRequest) PublisherReference ¶
func (q *QueryPublisherSequenceRequest) PublisherReference() string
func (*QueryPublisherSequenceRequest) SetCorrelationId ¶
func (q *QueryPublisherSequenceRequest) SetCorrelationId(id uint32)
func (*QueryPublisherSequenceRequest) SizeNeeded ¶
func (q *QueryPublisherSequenceRequest) SizeNeeded() int
func (*QueryPublisherSequenceRequest) Stream ¶
func (q *QueryPublisherSequenceRequest) Stream() string
func (*QueryPublisherSequenceRequest) UnmarshalBinary ¶
func (q *QueryPublisherSequenceRequest) UnmarshalBinary(data []byte) error
func (*QueryPublisherSequenceRequest) Version ¶
func (q *QueryPublisherSequenceRequest) Version() int16
type QueryPublisherSequenceResponse ¶
type QueryPublisherSequenceResponse struct {
// contains filtered or unexported fields
}
func NewQueryPublisherSequenceResponse ¶
func NewQueryPublisherSequenceResponse() *QueryPublisherSequenceResponse
func NewQueryPublisherSequenceResponseWith ¶
func NewQueryPublisherSequenceResponseWith(correlationId uint32, responseCode uint16, sequence uint64) *QueryPublisherSequenceResponse
func (*QueryPublisherSequenceResponse) CorrelationId ¶
func (qr *QueryPublisherSequenceResponse) CorrelationId() uint32
func (*QueryPublisherSequenceResponse) MarshalBinary ¶
func (qr *QueryPublisherSequenceResponse) MarshalBinary() (data []byte, err error)
func (*QueryPublisherSequenceResponse) Read ¶
func (qr *QueryPublisherSequenceResponse) Read(reader *bufio.Reader) error
func (*QueryPublisherSequenceResponse) ResponseCode ¶
func (qr *QueryPublisherSequenceResponse) ResponseCode() uint16
func (*QueryPublisherSequenceResponse) Sequence ¶
func (qr *QueryPublisherSequenceResponse) Sequence() uint64
type RouteQuery ¶
type RouteQuery struct {
// contains filtered or unexported fields
}
func NewRouteQuery ¶
func NewRouteQuery(routingKey, superStream string) *RouteQuery
func (*RouteQuery) CorrelationId ¶
func (r *RouteQuery) CorrelationId() uint32
func (*RouteQuery) Key ¶
func (r *RouteQuery) Key() uint16
func (*RouteQuery) RoutingKey ¶
func (r *RouteQuery) RoutingKey() string
func (*RouteQuery) SetCorrelationId ¶
func (r *RouteQuery) SetCorrelationId(id uint32)
func (*RouteQuery) SizeNeeded ¶
func (r *RouteQuery) SizeNeeded() int
func (*RouteQuery) SuperStream ¶
func (r *RouteQuery) SuperStream() string
func (*RouteQuery) UnmarshalBinary ¶
func (r *RouteQuery) UnmarshalBinary(data []byte) error
func (*RouteQuery) Version ¶
func (r *RouteQuery) Version() int16
type RouteResponse ¶
type RouteResponse struct {
// contains filtered or unexported fields
}
func NewRouteResponse ¶
func NewRouteResponse() *RouteResponse
func NewRouteResponseWith ¶
func NewRouteResponseWith(correlationId uint32, responseCode uint16, streams []string) *RouteResponse
func (*RouteResponse) CorrelationId ¶
func (r *RouteResponse) CorrelationId() uint32
func (*RouteResponse) MarshalBinary ¶
func (r *RouteResponse) MarshalBinary() ([]byte, error)
func (*RouteResponse) ResponseCode ¶
func (r *RouteResponse) ResponseCode() uint16
func (*RouteResponse) Streams ¶
func (r *RouteResponse) Streams() []string
type SaslAuthenticateRequest ¶
type SaslAuthenticateRequest struct {
// contains filtered or unexported fields
}
func NewSaslAuthenticateRequest ¶
func NewSaslAuthenticateRequest(mechanism string) *SaslAuthenticateRequest
func (*SaslAuthenticateRequest) CorrelationId ¶
func (s *SaslAuthenticateRequest) CorrelationId() uint32
func (*SaslAuthenticateRequest) Key ¶
func (s *SaslAuthenticateRequest) Key() uint16
func (*SaslAuthenticateRequest) SetChallengeResponse ¶
func (s *SaslAuthenticateRequest) SetChallengeResponse(challengeEncode encoding.BinaryMarshaler) error
func (*SaslAuthenticateRequest) SetCorrelationId ¶
func (s *SaslAuthenticateRequest) SetCorrelationId(id uint32)
func (*SaslAuthenticateRequest) SizeNeeded ¶
func (s *SaslAuthenticateRequest) SizeNeeded() int
func (*SaslAuthenticateRequest) Version ¶
func (s *SaslAuthenticateRequest) Version() int16
type SaslAuthenticateResponse ¶
type SaslAuthenticateResponse struct {
// contains filtered or unexported fields
}
func NewSaslAuthenticateResponseWith ¶
func NewSaslAuthenticateResponseWith(correlationId uint32, responseCode uint16, saslOpaqueData []byte) *SaslAuthenticateResponse
func (*SaslAuthenticateResponse) CorrelationId ¶
func (s *SaslAuthenticateResponse) CorrelationId() uint32
func (*SaslAuthenticateResponse) MarshalBinary ¶
func (s *SaslAuthenticateResponse) MarshalBinary() (data []byte, err error)
func (*SaslAuthenticateResponse) Read ¶
func (s *SaslAuthenticateResponse) Read(reader *bufio.Reader) error
func (*SaslAuthenticateResponse) ResponseCode ¶
func (s *SaslAuthenticateResponse) ResponseCode() uint16
type SaslHandshakeRequest ¶
type SaslHandshakeRequest struct {
// contains filtered or unexported fields
}
func NewSaslHandshakeRequest ¶
func NewSaslHandshakeRequest() *SaslHandshakeRequest
func (*SaslHandshakeRequest) CorrelationId ¶
func (s *SaslHandshakeRequest) CorrelationId() uint32
func (*SaslHandshakeRequest) Key ¶
func (s *SaslHandshakeRequest) Key() uint16
func (*SaslHandshakeRequest) SetCorrelationId ¶
func (s *SaslHandshakeRequest) SetCorrelationId(id uint32)
func (*SaslHandshakeRequest) SizeNeeded ¶
func (s *SaslHandshakeRequest) SizeNeeded() int
func (*SaslHandshakeRequest) Version ¶
func (s *SaslHandshakeRequest) Version() int16
type SaslHandshakeResponse ¶
type SaslHandshakeResponse struct { Mechanisms []string // contains filtered or unexported fields }
func NewSaslHandshakeResponse ¶
func NewSaslHandshakeResponse() *SaslHandshakeResponse
func NewSaslHandshakeResponseWith ¶
func NewSaslHandshakeResponseWith(correlationId uint32, responseCode uint16, mechanisms []string) *SaslHandshakeResponse
func (*SaslHandshakeResponse) CorrelationId ¶
func (s *SaslHandshakeResponse) CorrelationId() uint32
func (*SaslHandshakeResponse) MarshalBinary ¶
func (s *SaslHandshakeResponse) MarshalBinary() (data []byte, err error)
func (*SaslHandshakeResponse) Read ¶
func (s *SaslHandshakeResponse) Read(reader *bufio.Reader) error
func (*SaslHandshakeResponse) ResponseCode ¶
func (s *SaslHandshakeResponse) ResponseCode() uint16
type SaslPlainMechanism ¶
type SaslPlainMechanism struct {
// contains filtered or unexported fields
}
func NewSaslPlainMechanism ¶
func NewSaslPlainMechanism(username string, password string) *SaslPlainMechanism
func (SaslPlainMechanism) MarshalBinary ¶
func (s SaslPlainMechanism) MarshalBinary() (data []byte, err error)
type SimpleResponse ¶
type SimpleResponse struct {
// contains filtered or unexported fields
}
SimpleResponse is a response that only contains a correlation ID and a response code. Create commands usually return this type of response. like CreateStream etc..
func NewSimpleResponseWith ¶
func NewSimpleResponseWith(id uint32, responseCode uint16) *SimpleResponse
func (*SimpleResponse) CorrelationId ¶
func (c *SimpleResponse) CorrelationId() uint32
func (*SimpleResponse) MarshalBinary ¶
func (c *SimpleResponse) MarshalBinary() (data []byte, err error)
func (*SimpleResponse) ResponseCode ¶
func (c *SimpleResponse) ResponseCode() uint16
type StoreOffsetRequest ¶
type StoreOffsetRequest struct {
// contains filtered or unexported fields
}
StoreOffsetRequest sends the offset for a given stream. ref: https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_stream/docs/PROTOCOL.adoc#storeoffset
func NewStoreOffsetRequest ¶
func NewStoreOffsetRequest(reference, stream string, offset uint64) *StoreOffsetRequest
func (*StoreOffsetRequest) Key ¶
func (s *StoreOffsetRequest) Key() uint16
func (*StoreOffsetRequest) Offset ¶
func (s *StoreOffsetRequest) Offset() uint64
func (*StoreOffsetRequest) Reference ¶
func (s *StoreOffsetRequest) Reference() string
func (*StoreOffsetRequest) SizeNeeded ¶
func (s *StoreOffsetRequest) SizeNeeded() int
func (*StoreOffsetRequest) Stream ¶
func (s *StoreOffsetRequest) Stream() string
func (*StoreOffsetRequest) UnmarshalBinary ¶
func (s *StoreOffsetRequest) UnmarshalBinary(data []byte) error
func (*StoreOffsetRequest) Version ¶
func (s *StoreOffsetRequest) Version() int16
type StreamMetadata ¶
type StreamMetadata struct {
// contains filtered or unexported fields
}
type StreamStatsRequest ¶
type StreamStatsRequest struct {
// contains filtered or unexported fields
}
func NewStreamStatsRequest ¶
func NewStreamStatsRequest(stream string) *StreamStatsRequest
func (*StreamStatsRequest) CorrelationId ¶
func (s *StreamStatsRequest) CorrelationId() uint32
func (*StreamStatsRequest) Key ¶
func (s *StreamStatsRequest) Key() uint16
func (*StreamStatsRequest) SetCorrelationId ¶
func (s *StreamStatsRequest) SetCorrelationId(id uint32)
func (*StreamStatsRequest) SizeNeeded ¶
func (s *StreamStatsRequest) SizeNeeded() int
func (*StreamStatsRequest) Stream ¶
func (s *StreamStatsRequest) Stream() string
func (*StreamStatsRequest) UnmarshalBinary ¶
func (s *StreamStatsRequest) UnmarshalBinary(data []byte) error
func (*StreamStatsRequest) Version ¶
func (s *StreamStatsRequest) Version() int16
type StreamStatsResponse ¶
type StreamStatsResponse struct { Stats map[string]int64 // contains filtered or unexported fields }
func NewStreamStatsResponse ¶
func NewStreamStatsResponse() *StreamStatsResponse
func NewStreamStatsResponseWith ¶
func NewStreamStatsResponseWith(correlationId uint32, responseCode uint16, stats map[string]int64) *StreamStatsResponse
func (*StreamStatsResponse) CorrelationId ¶
func (sr *StreamStatsResponse) CorrelationId() uint32
func (*StreamStatsResponse) MarshalBinary ¶
func (sr *StreamStatsResponse) MarshalBinary() (data []byte, err error)
func (*StreamStatsResponse) ResponseCode ¶
func (sr *StreamStatsResponse) ResponseCode() uint16
type SubBatchPublishRequest ¶
type SubBatchPublishRequest struct {
// contains filtered or unexported fields
}
func (*SubBatchPublishRequest) Key ¶
func (p *SubBatchPublishRequest) Key() uint16
func (*SubBatchPublishRequest) SizeNeeded ¶
func (p *SubBatchPublishRequest) SizeNeeded() int
func (*SubBatchPublishRequest) Version ¶
func (p *SubBatchPublishRequest) Version() int16
type SubscribeRequest ¶
type SubscribeRequest struct {
// contains filtered or unexported fields
}
func (*SubscribeRequest) CorrelationId ¶
func (s *SubscribeRequest) CorrelationId() uint32
func (*SubscribeRequest) Credit ¶
func (s *SubscribeRequest) Credit() uint16
func (*SubscribeRequest) Key ¶
func (s *SubscribeRequest) Key() uint16
func (*SubscribeRequest) Offset ¶
func (s *SubscribeRequest) Offset() uint64
func (*SubscribeRequest) OffsetType ¶
func (s *SubscribeRequest) OffsetType() uint16
func (*SubscribeRequest) Properties ¶
func (s *SubscribeRequest) Properties() map[string]string
func (*SubscribeRequest) SetCorrelationId ¶
func (s *SubscribeRequest) SetCorrelationId(id uint32)
func (*SubscribeRequest) SizeNeeded ¶
func (s *SubscribeRequest) SizeNeeded() int
func (*SubscribeRequest) Stream ¶
func (s *SubscribeRequest) Stream() string
func (*SubscribeRequest) SubscriptionId ¶
func (s *SubscribeRequest) SubscriptionId() uint8
func (*SubscribeRequest) UnmarshalBinary ¶
func (s *SubscribeRequest) UnmarshalBinary(data []byte) error
func (*SubscribeRequest) Version ¶
func (s *SubscribeRequest) Version() int16
type SyncCommandRead ¶
type SyncCommandRead interface { CommandRead CorrelationId() uint32 ResponseCode() uint16 }
SyncCommandRead reads the response from the stream. It reads the header and then the response. the Sync part is related to the correlation ID. So the caller waits for the response based on correlation
type SyncCommandWrite ¶
type SyncCommandWrite interface { CommandWrite // Embedding the CommandWrite interface SetCorrelationId(id uint32) CorrelationId() uint32 }
SyncCommandWrite is the interface that wraps the WriteTo method. The interface is implemented by all commands that are sent to the server. and that have responses in RPC style. Command like: Create Stream, Delete Stream, Declare Publisher, etc. SetCorrelationId CorrelationId is used to match the response with the request.
type TuneRequest ¶
type TuneRequest struct {
// contains filtered or unexported fields
}
TuneRequest is initiated by the server. It's the few commands where the request is initiated from the server In this case, request implements the internal.SyncCommandRead interface, as opposed to other requests.
func (*TuneRequest) CorrelationId ¶
func (t *TuneRequest) CorrelationId() uint32
CorrelationId always returns 0. Tune frames do not have a correlation ID. This function is a placeholder to conform to the internal.SyncCommandRead interface.
func (*TuneRequest) FrameMaxSize ¶
func (t *TuneRequest) FrameMaxSize() uint32
func (*TuneRequest) HeartbeatPeriod ¶
func (t *TuneRequest) HeartbeatPeriod() uint32
func (*TuneRequest) ResponseCode ¶
func (t *TuneRequest) ResponseCode() uint16
ResponseCode is always OK for Tune frames. Tune frames do not have a response code. This function is implemented to conform with the interface
type TuneResponse ¶
type TuneResponse struct {
TuneRequest
}
TuneResponse is sent by the client. It's the few commands where the server sends a request and expects a response. In this case, the response implements the internal.SyncCommandWrite interface, as opposed to other responses.
func NewTuneResponse ¶
func NewTuneResponse(frameMaxSize, heartbeat uint32) *TuneResponse
func (*TuneResponse) Key ¶
func (t *TuneResponse) Key() uint16
func (*TuneResponse) SetCorrelationId ¶
func (t *TuneResponse) SetCorrelationId(correlationId uint32)
SetCorrelationId is a no-op. Tune frames do not have a correlation ID. This function is a placeholder to conform to the internal.SyncCommandWrite interface.
func (*TuneResponse) SizeNeeded ¶
func (t *TuneResponse) SizeNeeded() int
func (*TuneResponse) Version ¶
func (t *TuneResponse) Version() int16
type UnsubscribeRequest ¶
type UnsubscribeRequest struct {
// contains filtered or unexported fields
}
func NewUnsubscribeRequest ¶
func NewUnsubscribeRequest(subscriptionId uint8) *UnsubscribeRequest
func (*UnsubscribeRequest) CorrelationId ¶
func (u *UnsubscribeRequest) CorrelationId() uint32
func (*UnsubscribeRequest) Key ¶
func (u *UnsubscribeRequest) Key() uint16
func (*UnsubscribeRequest) SetCorrelationId ¶
func (u *UnsubscribeRequest) SetCorrelationId(id uint32)
func (*UnsubscribeRequest) SizeNeeded ¶
func (u *UnsubscribeRequest) SizeNeeded() int
func (*UnsubscribeRequest) SubscriptionId ¶
func (u *UnsubscribeRequest) SubscriptionId() uint8
func (*UnsubscribeRequest) UnmarshalBinary ¶
func (u *UnsubscribeRequest) UnmarshalBinary(data []byte) error
func (*UnsubscribeRequest) Version ¶
func (u *UnsubscribeRequest) Version() int16
Source Files ¶
- close.go
- command_types.go
- connection.go
- constants.go
- consumer_update.go
- create.go
- credit.go
- declare_publisher.go
- delete.go
- delete_publisher.go
- deliver.go
- exchange_command_versions.go
- header.go
- heartbeat.go
- metadata.go
- metadata_update.go
- open.go
- partitions.go
- peer_properties.go
- publish.go
- publish_confirm.go
- publish_error.go
- query_offset.go
- query_publisher_sequence.go
- route.go
- sasl_mechanisms.go
- simple_response.go
- store_offset.go
- stream_stats.go
- sub_batch_publish.go
- subscribe.go
- tune.go
- unsubscribe.go
- util.go
- wire_formatting.go