Documentation ¶
Index ¶
- Constants
- type CorrelatedMessage
- type CounterMessage
- func (m *CounterMessage) CopyKeyBuffer(buffer *atomic.Buffer, offset int32, length int32)
- func (m *CounterMessage) CopyLabelBuffer(buffer *atomic.Buffer, offset int32, length int32)
- func (m *CounterMessage) CopyLabelString(label string)
- func (m *CounterMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight
- type DestinationMessage
- type ImageMessage
- type PublicationMessage
- type RemoveMessage
- type SubscriptionMessage
Constants ¶
const ( // AddPublication command from client AddPublication int32 = 0x01 // RemovePublication command from client RemovePublication int32 = 0x02 // AddExclusivePublication from client AddExclusivePublication int32 = 0x03 // AddSubscription command from client AddSubscription int32 = 0x04 // RemoveSubscription command from client RemoveSubscription int32 = 0x05 // ClientKeepalive message from client */ ClientKeepalive int32 = 0x06 // AddDestination adds a destination to an existing Publication. AddDestination = 0x07 // RemoveDestination removes a destination from an existing Publication. RemoveDestination = 0x08 // AddCounter command from client AddCounter = 0x09 // RemoveCounter command from client RemoveCounter = 0x0A // ClientClose command from client ClientClose = 0x0B // AddRcvDestination adds a Destination for existing Subscription. AddRcvDestination = 0x0c // RemoveRcvDestination removes a Destination for existing Subscription. RemoveRcvDestination = 0x0D )
const ( ErrorCodeUnknownCodeValue = -1 ErrorCodeUnused = 0 ErrorCodeInvalidChannel = 1 ErrorCodeUnknownSubscription = 2 ErrorCodeUnknownPublication = 3 ErrorCodeChannelEndpointError = 4 ErrorCodeUnknownCounter = 5 ErrorCodeUnknownCommandTypeID = 6 ErrorCodeMalformedCommand = 7 ErrorCodeNotSupported = 8 ErrorCodeUnknownHost = 9 ErrorCodeGenericError = 11 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CorrelatedMessage ¶
type CorrelatedMessage struct {}
type CounterMessage ¶
type CounterMessage struct { flyweight.FWBase ClientID flyweight.Int64Field CorrelationID flyweight.Int64Field CounterTypeID flyweight.Int32Field // contains filtered or unexported fields }
CounterMessage has to violate the pattern above. The existing pattern only works either without any variable fields, or with exactly one variable field at the end of the message. CounterMessage has 2 variable fields, requiring realignment of the second anytime there are changes to the first. This pattern is somewhere between the Go pattern and the Java/C++ impls' pattern. At some point, we may want to refactor all the flyweights to match the Java/C++ pattern.
func (*CounterMessage) CopyKeyBuffer ¶
func (m *CounterMessage) CopyKeyBuffer(buffer *atomic.Buffer, offset int32, length int32)
Note: If you call this with a buffer that's a different length than the prior buffer, and you don't also call CopyLabelBuffer, the underlying data will be corrupt. This matches the Java impl.
func (*CounterMessage) CopyLabelBuffer ¶
func (m *CounterMessage) CopyLabelBuffer(buffer *atomic.Buffer, offset int32, length int32)
func (*CounterMessage) CopyLabelString ¶
func (m *CounterMessage) CopyLabelString(label string)
type DestinationMessage ¶
type DestinationMessage struct { flyweight.FWBase ClientID flyweight.Int64Field CorrelationID flyweight.Int64Field RegistrationCorrelationID flyweight.Int64Field Channel flyweight.StringField }
type ImageMessage ¶
type ImageMessage struct { flyweight.FWBase CorrelationID flyweight.Int64Field SubscriptionRegistrationID flyweight.Int64Field StreamID flyweight.Int32Field Channel flyweight.StringField }
type PublicationMessage ¶
type PublicationMessage struct { flyweight.FWBase ClientID flyweight.Int64Field CorrelationID flyweight.Int64Field StreamID flyweight.Int32Field Channel flyweight.StringField }
type RemoveMessage ¶
type RemoveMessage struct { flyweight.FWBase ClientID flyweight.Int64Field CorrelationID flyweight.Int64Field RegistrationID flyweight.Int64Field }
type SubscriptionMessage ¶
type SubscriptionMessage struct { flyweight.FWBase ClientID flyweight.Int64Field CorrelationID flyweight.Int64Field RegistrationCorrelationID flyweight.Int64Field StreamID flyweight.Int32Field Channel flyweight.StringField }