command

package
v0.0.0-...-f6902ab Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
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
)
View Source
const (
	ErrorCodeUnknownCodeValue               = -1
	ErrorCodeUnused                         = 0
	ErrorCodeInvalidChannel                 = 1
	ErrorCodeUnknownSubscription            = 2
	ErrorCodeUnknownPublication             = 3
	ErrorCodeChannelEndpointError           = 4
	ErrorCodeUnknownCounter                 = 5
	ErrorCodeUnknownCommandTypeID           = 6
	ErrorCodeMalformedCommand               = 7
	ErrorCodeNotSupported                   = 8
	ErrorCodeUnknownHost                    = 9
	ErrorCodeResourceTemporarilyUnavailable = 10
	ErrorCodeGenericError                   = 11
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CorrelatedMessage

type CorrelatedMessage struct {
	flyweight.FWBase

	ClientID      flyweight.Int64Field
	CorrelationID flyweight.Int64Field
}

func (*CorrelatedMessage) Wrap

func (m *CorrelatedMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight

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)

func (*CounterMessage) Wrap

func (m *CounterMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight

type DestinationMessage

type DestinationMessage struct {
	flyweight.FWBase

	ClientID                  flyweight.Int64Field
	CorrelationID             flyweight.Int64Field
	RegistrationCorrelationID flyweight.Int64Field
	Channel                   flyweight.StringField
}

func (*DestinationMessage) Wrap

func (m *DestinationMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight

type ImageMessage

type ImageMessage struct {
	flyweight.FWBase

	CorrelationID              flyweight.Int64Field
	SubscriptionRegistrationID flyweight.Int64Field
	StreamID                   flyweight.Int32Field
	Channel                    flyweight.StringField
}

func (*ImageMessage) Wrap

func (m *ImageMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight

type PublicationMessage

type PublicationMessage struct {
	flyweight.FWBase

	ClientID      flyweight.Int64Field
	CorrelationID flyweight.Int64Field
	StreamID      flyweight.Int32Field
	Channel       flyweight.StringField
}

func (*PublicationMessage) Wrap

func (m *PublicationMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight

type RemoveMessage

type RemoveMessage struct {
	flyweight.FWBase

	ClientID       flyweight.Int64Field
	CorrelationID  flyweight.Int64Field
	RegistrationID flyweight.Int64Field
}

func (*RemoveMessage) Wrap

func (m *RemoveMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight

type SubscriptionMessage

type SubscriptionMessage struct {
	flyweight.FWBase

	ClientID                  flyweight.Int64Field
	CorrelationID             flyweight.Int64Field
	RegistrationCorrelationID flyweight.Int64Field
	StreamID                  flyweight.Int32Field
	Channel                   flyweight.StringField
}

func (*SubscriptionMessage) Wrap

func (m *SubscriptionMessage) Wrap(buf *atomic.Buffer, offset int) flyweight.Flyweight

Jump to

Keyboard shortcuts

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