Documentation ¶
Index ¶
- Constants
- func AssertSendableChanEmpty(assert *require.Assertions, channel chan Sendable)
- func AssertStrEqual(assert *require.Assertions, a, b interface{})
- func GetMessageType(msg Sendable) string
- func IsChanClosed(channel chan bool) bool
- func Parse(querystring string) rootNode
- func SetupLogging(config *Config)
- func SetupTestLogging()
- type AcknowledgeMessage
- func (z *AcknowledgeMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *AcknowledgeMessage) Encode(enc *msgp.Writer) error
- func (z AcknowledgeMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *AcknowledgeMessage) GetID() MessageIDType
- func (m *AcknowledgeMessage) Marshal() ([]byte, error)
- func (z AcknowledgeMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z AcknowledgeMessage) Msgsize() (s int)
- func (z *AcknowledgeMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BenchmarkConfig
- type BrokerAssignmentMessage
- func (z *BrokerAssignmentMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerAssignmentMessage) Encode(enc *msgp.Writer) error
- func (z *BrokerAssignmentMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerAssignmentMessage) Marshal() ([]byte, error)
- func (z *BrokerAssignmentMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BrokerAssignmentMessage) Msgsize() (s int)
- func (z *BrokerAssignmentMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BrokerConnectMessage
- func (m *BrokerConnectMessage) Copy() SendableWithID
- func (z *BrokerConnectMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerConnectMessage) Encode(enc *msgp.Writer) error
- func (z *BrokerConnectMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerConnectMessage) Marshal() ([]byte, error)
- func (z *BrokerConnectMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BrokerConnectMessage) Msgsize() (s int)
- func (z *BrokerConnectMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BrokerDeathMessage
- func (m *BrokerDeathMessage) Copy() SendableWithID
- func (z *BrokerDeathMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerDeathMessage) Encode(enc *msgp.Writer) error
- func (z *BrokerDeathMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerDeathMessage) Marshal() ([]byte, error)
- func (z *BrokerDeathMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BrokerDeathMessage) Msgsize() (s int)
- func (z *BrokerDeathMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BrokerInfo
- type BrokerPublishMessage
- func (m *BrokerPublishMessage) Copy() SendableWithID
- func (z *BrokerPublishMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerPublishMessage) Encode(enc *msgp.Writer) error
- func (z *BrokerPublishMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerPublishMessage) FromPublishMessage(pm *PublishMessage)
- func (m *BrokerPublishMessage) Marshal() ([]byte, error)
- func (z *BrokerPublishMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BrokerPublishMessage) Msgsize() (s int)
- func (m *BrokerPublishMessage) ToRegular() *PublishMessage
- func (z *BrokerPublishMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BrokerQueryMessage
- func (m *BrokerQueryMessage) Copy() SendableWithID
- func (z *BrokerQueryMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerQueryMessage) Encode(enc *msgp.Writer) error
- func (z *BrokerQueryMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerQueryMessage) Marshal() ([]byte, error)
- func (z *BrokerQueryMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BrokerQueryMessage) Msgsize() (s int)
- func (z *BrokerQueryMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BrokerRequestMessage
- func (z *BrokerRequestMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerRequestMessage) Encode(enc *msgp.Writer) error
- func (z BrokerRequestMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerRequestMessage) Marshal() ([]byte, error)
- func (z BrokerRequestMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z BrokerRequestMessage) Msgsize() (s int)
- func (z *BrokerRequestMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BrokerSubscriptionDiffMessage
- func (m *BrokerSubscriptionDiffMessage) Copy() SendableWithID
- func (z *BrokerSubscriptionDiffMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerSubscriptionDiffMessage) Encode(enc *msgp.Writer) error
- func (z *BrokerSubscriptionDiffMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerSubscriptionDiffMessage) FromProducerState(state map[UUID]ProducerState)
- func (m *BrokerSubscriptionDiffMessage) Marshal() ([]byte, error)
- func (z *BrokerSubscriptionDiffMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BrokerSubscriptionDiffMessage) Msgsize() (s int)
- func (z *BrokerSubscriptionDiffMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BrokerTerminateMessage
- func (m *BrokerTerminateMessage) Copy() SendableWithID
- func (z *BrokerTerminateMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *BrokerTerminateMessage) Encode(enc *msgp.Writer) error
- func (z *BrokerTerminateMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *BrokerTerminateMessage) Marshal() ([]byte, error)
- func (z *BrokerTerminateMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BrokerTerminateMessage) Msgsize() (s int)
- func (z *BrokerTerminateMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type CancelForwardRequest
- func (m *CancelForwardRequest) Copy() SendableWithID
- func (z *CancelForwardRequest) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *CancelForwardRequest) Encode(enc *msgp.Writer) error
- func (z *CancelForwardRequest) EncodeMsg(en *msgp.Writer) (err error)
- func (m *CancelForwardRequest) Marshal() ([]byte, error)
- func (z *CancelForwardRequest) MarshalMsg(b []byte) (o []byte, err error)
- func (z *CancelForwardRequest) Msgsize() (s int)
- func (z *CancelForwardRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ClientTerminationMessage
- func (m *ClientTerminationMessage) Copy() SendableWithID
- func (z *ClientTerminationMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *ClientTerminationMessage) Encode(enc *msgp.Writer) error
- func (z *ClientTerminationMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *ClientTerminationMessage) Marshal() ([]byte, error)
- func (z *ClientTerminationMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ClientTerminationMessage) Msgsize() (s int)
- func (z *ClientTerminationMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ClientTerminationRequest
- func (m *ClientTerminationRequest) Copy() SendableWithID
- func (z *ClientTerminationRequest) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *ClientTerminationRequest) Encode(enc *msgp.Writer) error
- func (z *ClientTerminationRequest) EncodeMsg(en *msgp.Writer) (err error)
- func (m *ClientTerminationRequest) Marshal() ([]byte, error)
- func (z *ClientTerminationRequest) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ClientTerminationRequest) Msgsize() (s int)
- func (z *ClientTerminationRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Clock
- type Config
- type CoordinatorConfig
- type DebugConfig
- type FakeClock
- type ForwardRequestMessage
- func (m *ForwardRequestMessage) Copy() SendableWithID
- func (z *ForwardRequestMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *ForwardRequestMessage) Encode(enc *msgp.Writer) error
- func (z *ForwardRequestMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *ForwardRequestMessage) Marshal() ([]byte, error)
- func (z *ForwardRequestMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ForwardRequestMessage) Msgsize() (s int)
- func (z *ForwardRequestMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type HeartbeatMessage
- type LeaderChangeMessage
- type Lexer
- type LoggingConfig
- type Message
- type MessageIDStruct
- func (z *MessageIDStruct) DecodeMsg(dc *msgp.Reader) (err error)
- func (z MessageIDStruct) EncodeMsg(en *msgp.Writer) (err error)
- func (sendable *MessageIDStruct) GetID() MessageIDType
- func (z MessageIDStruct) MarshalMsg(b []byte) (o []byte, err error)
- func (z MessageIDStruct) Msgsize() (s int)
- func (sendable *MessageIDStruct) SetID(id MessageIDType)
- func (z *MessageIDStruct) UnmarshalMsg(bts []byte) (o []byte, err error)
- type MessageIDType
- func (z *MessageIDType) DecodeMsg(dc *msgp.Reader) (err error)
- func (z MessageIDType) EncodeMsg(en *msgp.Writer) (err error)
- func (z MessageIDType) MarshalMsg(b []byte) (o []byte, err error)
- func (z MessageIDType) Msgsize() (s int)
- func (z *MessageIDType) UnmarshalMsg(bts []byte) (o []byte, err error)
- type MessageType
- type MetadataStore
- func (ms *MetadataStore) DropDatabase()
- func (ms *MetadataStore) Query(node rootNode) (*Query, error)
- func (ms *MetadataStore) Reevaluate(query *Query) (added, removed []UUID)
- func (ms *MetadataStore) RemovePublisher(uuid UUID) error
- func (ms *MetadataStore) Save(publisherID *UUID, metadata map[string]interface{}) error
- type MongoConfig
- type Node
- type ProducerState
- func (z *ProducerState) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ProducerState) EncodeMsg(en *msgp.Writer) (err error)
- func (z ProducerState) MarshalMsg(b []byte) (o []byte, err error)
- func (z ProducerState) Msgsize() (s int)
- func (z *ProducerState) UnmarshalMsg(bts []byte) (o []byte, err error)
- type PublishMessage
- func (z *PublishMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *PublishMessage) Encode(enc *msgp.Writer) error
- func (z *PublishMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *PublishMessage) FromArray(array []interface{}) error
- func (m *PublishMessage) FromBroker(bpm *BrokerPublishMessage)
- func (m *PublishMessage) IsEmpty() bool
- func (m *PublishMessage) Marshal() ([]byte, error)
- func (z *PublishMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *PublishMessage) Msgsize() (s int)
- func (m *PublishMessage) ToBroker() *BrokerPublishMessage
- func (z *PublishMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type PublisherTerminationMessage
- func (m *PublisherTerminationMessage) Copy() SendableWithID
- func (z *PublisherTerminationMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *PublisherTerminationMessage) Encode(enc *msgp.Writer) error
- func (z *PublisherTerminationMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *PublisherTerminationMessage) Marshal() ([]byte, error)
- func (z *PublisherTerminationMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z *PublisherTerminationMessage) Msgsize() (s int)
- func (z *PublisherTerminationMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type PublisherTerminationRequest
- func (m *PublisherTerminationRequest) Copy() SendableWithID
- func (z *PublisherTerminationRequest) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *PublisherTerminationRequest) Encode(enc *msgp.Writer) error
- func (z *PublisherTerminationRequest) EncodeMsg(en *msgp.Writer) (err error)
- func (m *PublisherTerminationRequest) Marshal() ([]byte, error)
- func (z *PublisherTerminationRequest) MarshalMsg(b []byte) (o []byte, err error)
- func (z *PublisherTerminationRequest) Msgsize() (s int)
- func (z *PublisherTerminationRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Query
- type QueryMessage
- func (z *QueryMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *QueryMessage) Encode(enc *msgp.Writer) error
- func (z QueryMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *QueryMessage) Marshal() ([]byte, error)
- func (z QueryMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z QueryMessage) Msgsize() (s int)
- func (z *QueryMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type RealClock
- type RequestHeartbeatMessage
- type Sendable
- type SendableWithID
- type ServerConfig
- type SubscriptionDiffMessage
- func (z *SubscriptionDiffMessage) DecodeMsg(dc *msgp.Reader) (err error)
- func (m *SubscriptionDiffMessage) Encode(enc *msgp.Writer) error
- func (z SubscriptionDiffMessage) EncodeMsg(en *msgp.Writer) (err error)
- func (m *SubscriptionDiffMessage) FromProducerState(state map[UUID]ProducerState)
- func (m *SubscriptionDiffMessage) Marshal() ([]byte, error)
- func (z SubscriptionDiffMessage) MarshalMsg(b []byte) (o []byte, err error)
- func (z SubscriptionDiffMessage) Msgsize() (s int)
- func (z *SubscriptionDiffMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
- type UUID
Constants ¶
const AND = 57348
const EQ = 57352
const HAS = 57354
const KEY = 57355
const LIKE = 57351
const LPAREN = 57346
const NEQ = 57353
const NOT = 57350
const OR = 57349
const RPAREN = 57347
const VALUE = 57356
Variables ¶
This section is empty.
Functions ¶
func AssertSendableChanEmpty ¶
func AssertSendableChanEmpty(assert *require.Assertions, channel chan Sendable)
func AssertStrEqual ¶
func AssertStrEqual(assert *require.Assertions, a, b interface{})
Poor man's deep equality check because I can't get anything else to work
func GetMessageType ¶
func IsChanClosed ¶
func SetupLogging ¶
func SetupLogging(config *Config)
func SetupTestLogging ¶
func SetupTestLogging()
Types ¶
type AcknowledgeMessage ¶
type AcknowledgeMessage struct {
MessageID MessageIDType
}
Used for communication between coordinator and brokers to confirm that a message was received. The sender should keep track of unacknowledged messages and remove them from some sort of buffer when an ack is received.
func (*AcknowledgeMessage) DecodeMsg ¶
func (z *AcknowledgeMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (AcknowledgeMessage) EncodeMsg ¶
func (z AcknowledgeMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*AcknowledgeMessage) GetID ¶
func (m *AcknowledgeMessage) GetID() MessageIDType
func (*AcknowledgeMessage) Marshal ¶
func (m *AcknowledgeMessage) Marshal() ([]byte, error)
func (AcknowledgeMessage) MarshalMsg ¶
func (z AcknowledgeMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (AcknowledgeMessage) Msgsize ¶
func (z AcknowledgeMessage) Msgsize() (s int)
func (*AcknowledgeMessage) UnmarshalMsg ¶
func (z *AcknowledgeMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BenchmarkConfig ¶
type BrokerAssignmentMessage ¶
type BrokerAssignmentMessage struct { // the ID and address of the failover broker: "ip:port" BrokerInfo }
Sent from coordinator -> clients/publishers to let them know which failover broker they should contact
func (*BrokerAssignmentMessage) DecodeMsg ¶
func (z *BrokerAssignmentMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BrokerAssignmentMessage) Encode ¶
func (m *BrokerAssignmentMessage) Encode(enc *msgp.Writer) error
func (*BrokerAssignmentMessage) EncodeMsg ¶
func (z *BrokerAssignmentMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerAssignmentMessage) Marshal ¶
func (m *BrokerAssignmentMessage) Marshal() ([]byte, error)
func (*BrokerAssignmentMessage) MarshalMsg ¶
func (z *BrokerAssignmentMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BrokerAssignmentMessage) Msgsize ¶
func (z *BrokerAssignmentMessage) Msgsize() (s int)
func (*BrokerAssignmentMessage) UnmarshalMsg ¶
func (z *BrokerAssignmentMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerConnectMessage ¶
type BrokerConnectMessage struct { MessageIDStruct BrokerInfo // its own ID and where incoming requests should be routed to }
Sent from broker -> Coordinator whenever a broker comes online
func (*BrokerConnectMessage) Copy ¶
func (m *BrokerConnectMessage) Copy() SendableWithID
func (*BrokerConnectMessage) DecodeMsg ¶
func (z *BrokerConnectMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BrokerConnectMessage) EncodeMsg ¶
func (z *BrokerConnectMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerConnectMessage) Marshal ¶
func (m *BrokerConnectMessage) Marshal() ([]byte, error)
func (*BrokerConnectMessage) MarshalMsg ¶
func (z *BrokerConnectMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BrokerConnectMessage) Msgsize ¶
func (z *BrokerConnectMessage) Msgsize() (s int)
func (*BrokerConnectMessage) UnmarshalMsg ¶
func (z *BrokerConnectMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerDeathMessage ¶
type BrokerDeathMessage struct { MessageIDStruct BrokerInfo }
Sent from coordinator -> all brokers when it determines that a broker is offline, notifying other brokers they should stop attempting to forward to that broker
func (*BrokerDeathMessage) Copy ¶
func (m *BrokerDeathMessage) Copy() SendableWithID
func (*BrokerDeathMessage) DecodeMsg ¶
func (z *BrokerDeathMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BrokerDeathMessage) EncodeMsg ¶
func (z *BrokerDeathMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerDeathMessage) Marshal ¶
func (m *BrokerDeathMessage) Marshal() ([]byte, error)
func (*BrokerDeathMessage) MarshalMsg ¶
func (z *BrokerDeathMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BrokerDeathMessage) Msgsize ¶
func (z *BrokerDeathMessage) Msgsize() (s int)
func (*BrokerDeathMessage) UnmarshalMsg ¶
func (z *BrokerDeathMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerInfo ¶
type BrokerInfo struct { BrokerID UUID ClientBrokerAddr string // "ip:port" to be contacted at CoordBrokerAddr string // "ip:port" to be contacted at }
func (*BrokerInfo) DecodeMsg ¶
func (z *BrokerInfo) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (BrokerInfo) EncodeMsg ¶
func (z BrokerInfo) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (BrokerInfo) MarshalMsg ¶
func (z BrokerInfo) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (BrokerInfo) Msgsize ¶
func (z BrokerInfo) Msgsize() (s int)
func (*BrokerInfo) UnmarshalMsg ¶
func (z *BrokerInfo) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerPublishMessage ¶
type BrokerPublishMessage struct { MessageIDStruct UUID UUID Metadata map[string]interface{} Value interface{} L sync.RWMutex `msg:"-"` }
Analogous to PublishMessage, but used for internal communication, i.e. when a broker forwards a PublishMessage to another broker
func (*BrokerPublishMessage) Copy ¶
func (m *BrokerPublishMessage) Copy() SendableWithID
func (*BrokerPublishMessage) DecodeMsg ¶
func (z *BrokerPublishMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BrokerPublishMessage) EncodeMsg ¶
func (z *BrokerPublishMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerPublishMessage) FromPublishMessage ¶
func (m *BrokerPublishMessage) FromPublishMessage(pm *PublishMessage)
func (*BrokerPublishMessage) Marshal ¶
func (m *BrokerPublishMessage) Marshal() ([]byte, error)
func (*BrokerPublishMessage) MarshalMsg ¶
func (z *BrokerPublishMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BrokerPublishMessage) Msgsize ¶
func (z *BrokerPublishMessage) Msgsize() (s int)
func (*BrokerPublishMessage) ToRegular ¶
func (m *BrokerPublishMessage) ToRegular() *PublishMessage
func (*BrokerPublishMessage) UnmarshalMsg ¶
func (z *BrokerPublishMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerQueryMessage ¶
type BrokerQueryMessage struct { MessageIDStruct Query string UUID UUID }
Analogous to QueryMessage, but used when sending messages from brokers to the coordinator so that it is possible to tell which client the query is attached to
func (*BrokerQueryMessage) Copy ¶
func (m *BrokerQueryMessage) Copy() SendableWithID
func (*BrokerQueryMessage) DecodeMsg ¶
func (z *BrokerQueryMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BrokerQueryMessage) EncodeMsg ¶
func (z *BrokerQueryMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerQueryMessage) Marshal ¶
func (m *BrokerQueryMessage) Marshal() ([]byte, error)
func (*BrokerQueryMessage) MarshalMsg ¶
func (z *BrokerQueryMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BrokerQueryMessage) Msgsize ¶
func (z *BrokerQueryMessage) Msgsize() (s int)
func (*BrokerQueryMessage) UnmarshalMsg ¶
func (z *BrokerQueryMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerRequestMessage ¶
type BrokerRequestMessage struct { // this is the broker that clients are expecting // They send it to Coordinator so that when this broker comes back online, // it knows which clients to inform to reconnect // "ip:port" LocalBrokerAddr string IsPublisher bool // false if a client UUID UUID // UUID of client or publisher }
Sent from clients / publishers -> coordinator when they cannot contact their local/home broker
func (*BrokerRequestMessage) DecodeMsg ¶
func (z *BrokerRequestMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (BrokerRequestMessage) EncodeMsg ¶
func (z BrokerRequestMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerRequestMessage) Marshal ¶
func (m *BrokerRequestMessage) Marshal() ([]byte, error)
func (BrokerRequestMessage) MarshalMsg ¶
func (z BrokerRequestMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (BrokerRequestMessage) Msgsize ¶
func (z BrokerRequestMessage) Msgsize() (s int)
func (*BrokerRequestMessage) UnmarshalMsg ¶
func (z *BrokerRequestMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerSubscriptionDiffMessage ¶
type BrokerSubscriptionDiffMessage struct { MessageIDStruct NewPublishers []UUID DelPublishers []UUID Query string }
Analogous to SubscriptionDiffMessage, but used for internal comm., i.e. when coordinator notifies a broker to talk to its client
func (*BrokerSubscriptionDiffMessage) Copy ¶
func (m *BrokerSubscriptionDiffMessage) Copy() SendableWithID
func (*BrokerSubscriptionDiffMessage) DecodeMsg ¶
func (z *BrokerSubscriptionDiffMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BrokerSubscriptionDiffMessage) Encode ¶
func (m *BrokerSubscriptionDiffMessage) Encode(enc *msgp.Writer) error
func (*BrokerSubscriptionDiffMessage) EncodeMsg ¶
func (z *BrokerSubscriptionDiffMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerSubscriptionDiffMessage) FromProducerState ¶
func (m *BrokerSubscriptionDiffMessage) FromProducerState(state map[UUID]ProducerState)
func (*BrokerSubscriptionDiffMessage) Marshal ¶
func (m *BrokerSubscriptionDiffMessage) Marshal() ([]byte, error)
func (*BrokerSubscriptionDiffMessage) MarshalMsg ¶
func (z *BrokerSubscriptionDiffMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BrokerSubscriptionDiffMessage) Msgsize ¶
func (z *BrokerSubscriptionDiffMessage) Msgsize() (s int)
func (*BrokerSubscriptionDiffMessage) UnmarshalMsg ¶
func (z *BrokerSubscriptionDiffMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BrokerTerminateMessage ¶
type BrokerTerminateMessage struct {
MessageIDStruct
}
Sent from broker -> coordinator if it is going offline permanently
func (*BrokerTerminateMessage) Copy ¶
func (m *BrokerTerminateMessage) Copy() SendableWithID
func (*BrokerTerminateMessage) DecodeMsg ¶
func (z *BrokerTerminateMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BrokerTerminateMessage) Encode ¶
func (m *BrokerTerminateMessage) Encode(enc *msgp.Writer) error
func (*BrokerTerminateMessage) EncodeMsg ¶
func (z *BrokerTerminateMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BrokerTerminateMessage) Marshal ¶
func (m *BrokerTerminateMessage) Marshal() ([]byte, error)
func (*BrokerTerminateMessage) MarshalMsg ¶
func (z *BrokerTerminateMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BrokerTerminateMessage) Msgsize ¶
func (z *BrokerTerminateMessage) Msgsize() (s int)
func (*BrokerTerminateMessage) UnmarshalMsg ¶
func (z *BrokerTerminateMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CancelForwardRequest ¶
type CancelForwardRequest struct { MessageIDStruct // list of publishers whose messages should be cancelled PublisherList []UUID // the query that has been cancelled Query string // Necessary so you know who you need to stop forwarding to, since you // may be forwarding to multiple brokers for the same query BrokerInfo }
Sent from coordinator -> brokers to cancel the forwarding route created by a ForwardRequest; used when clients cancel their subscription/disappear
func (*CancelForwardRequest) Copy ¶
func (m *CancelForwardRequest) Copy() SendableWithID
func (*CancelForwardRequest) DecodeMsg ¶
func (z *CancelForwardRequest) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*CancelForwardRequest) EncodeMsg ¶
func (z *CancelForwardRequest) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*CancelForwardRequest) Marshal ¶
func (m *CancelForwardRequest) Marshal() ([]byte, error)
func (*CancelForwardRequest) MarshalMsg ¶
func (z *CancelForwardRequest) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CancelForwardRequest) Msgsize ¶
func (z *CancelForwardRequest) Msgsize() (s int)
func (*CancelForwardRequest) UnmarshalMsg ¶
func (z *CancelForwardRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ClientTerminationMessage ¶
type ClientTerminationMessage struct { MessageIDStruct // the client that has left ClientID UUID }
Sent from broker -> coordinator when a client connection / subscription is terminated
func (*ClientTerminationMessage) Copy ¶
func (m *ClientTerminationMessage) Copy() SendableWithID
func (*ClientTerminationMessage) DecodeMsg ¶
func (z *ClientTerminationMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ClientTerminationMessage) Encode ¶
func (m *ClientTerminationMessage) Encode(enc *msgp.Writer) error
func (*ClientTerminationMessage) EncodeMsg ¶
func (z *ClientTerminationMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ClientTerminationMessage) Marshal ¶
func (m *ClientTerminationMessage) Marshal() ([]byte, error)
func (*ClientTerminationMessage) MarshalMsg ¶
func (z *ClientTerminationMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ClientTerminationMessage) Msgsize ¶
func (z *ClientTerminationMessage) Msgsize() (s int)
func (*ClientTerminationMessage) UnmarshalMsg ¶
func (z *ClientTerminationMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ClientTerminationRequest ¶
type ClientTerminationRequest struct { MessageIDStruct // "ip:port" ClientIDs []UUID }
**** ClientTerminationRequest **** Sent from coordinator -> broker when coordinator wants the broker to break the connection with a specific client (i.e., when the broker is a failover and the local broker comes back online)
func (*ClientTerminationRequest) Copy ¶
func (m *ClientTerminationRequest) Copy() SendableWithID
func (*ClientTerminationRequest) DecodeMsg ¶
func (z *ClientTerminationRequest) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ClientTerminationRequest) Encode ¶
func (m *ClientTerminationRequest) Encode(enc *msgp.Writer) error
func (*ClientTerminationRequest) EncodeMsg ¶
func (z *ClientTerminationRequest) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ClientTerminationRequest) Marshal ¶
func (m *ClientTerminationRequest) Marshal() ([]byte, error)
func (*ClientTerminationRequest) MarshalMsg ¶
func (z *ClientTerminationRequest) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ClientTerminationRequest) Msgsize ¶
func (z *ClientTerminationRequest) Msgsize() (s int)
func (*ClientTerminationRequest) UnmarshalMsg ¶
func (z *ClientTerminationRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Config ¶
type Config struct { Logging LoggingConfig Server ServerConfig Mongo MongoConfig Coordinator CoordinatorConfig Debug DebugConfig Benchmark BenchmarkConfig }
func LoadConfig ¶
Don't want to log anything since this is called before SetupLogging; return the desired log message to be logged later if desired TODO this makes it so that default_config.ini overwrites config.ini...
type CoordinatorConfig ¶
type CoordinatorConfig struct { Port int Global bool HeartbeatInterval int // seconds CoordinatorCount int // number of coordinators total EtcdAddresses string // comma-separated list GCFreq int // how often (number of events) to GC etcd EnableContinuousCheckpointing bool // true to continuously checkpoint DisableSendLog bool // true to not log sent messages UseAWSIPSwitcher bool // true to use the AWP IP Switcher; doesn't switch IPs otherwise UseEtcd bool // true if events should be stored in Etcd; CoordinatorCount must be 1 InstanceId string // AWS instance id, e.g. i-1a2b3c4d Region string // AWS region name, e.g. us-west-1 ElasticIP string // the elastic IP to fight over }
Coordinator configuration
type DebugConfig ¶
Debugging configuration
type FakeClock ¶
type FakeClock struct {
// contains filtered or unexported fields
}
func NewFakeClock ¶
func (*FakeClock) AdvanceNowTime ¶
func (*FakeClock) SetNowTime ¶
type ForwardRequestMessage ¶
type ForwardRequestMessage struct { MessageIDStruct // list of publishers whose messages should be forwarded PublisherList []UUID // the destination broker BrokerInfo // the query string which defines this forward request Query string }
Sent from coordinator -> brokers to tell the broker to create a forwarding route from one broker to another
func (*ForwardRequestMessage) Copy ¶
func (m *ForwardRequestMessage) Copy() SendableWithID
func (*ForwardRequestMessage) DecodeMsg ¶
func (z *ForwardRequestMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ForwardRequestMessage) Encode ¶
func (m *ForwardRequestMessage) Encode(enc *msgp.Writer) error
func (*ForwardRequestMessage) EncodeMsg ¶
func (z *ForwardRequestMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ForwardRequestMessage) Marshal ¶
func (m *ForwardRequestMessage) Marshal() ([]byte, error)
func (*ForwardRequestMessage) MarshalMsg ¶
func (z *ForwardRequestMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ForwardRequestMessage) Msgsize ¶
func (z *ForwardRequestMessage) Msgsize() (s int)
func (*ForwardRequestMessage) UnmarshalMsg ¶
func (z *ForwardRequestMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type HeartbeatMessage ¶
type HeartbeatMessage struct{}
func (*HeartbeatMessage) Marshal ¶
func (m *HeartbeatMessage) Marshal() ([]byte, error)
type LeaderChangeMessage ¶
type LeaderChangeMessage struct{}
Used for the log only to mark that a leadership change occurred at that point in the log
func (*LeaderChangeMessage) Marshal ¶
func (m *LeaderChangeMessage) Marshal() ([]byte, error)
type LoggingConfig ¶
configuration for the logging
type Message ¶
type Message interface {
GetID() MessageIDType
}
type MessageIDStruct ¶
type MessageIDStruct struct {
MessageID MessageIDType
}
func GetMessageIDStruct ¶
func GetMessageIDStruct() MessageIDStruct
func (*MessageIDStruct) DecodeMsg ¶
func (z *MessageIDStruct) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (MessageIDStruct) EncodeMsg ¶
func (z MessageIDStruct) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*MessageIDStruct) GetID ¶
func (sendable *MessageIDStruct) GetID() MessageIDType
func (MessageIDStruct) MarshalMsg ¶
func (z MessageIDStruct) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (MessageIDStruct) Msgsize ¶
func (z MessageIDStruct) Msgsize() (s int)
func (*MessageIDStruct) SetID ¶
func (sendable *MessageIDStruct) SetID(id MessageIDType)
func (*MessageIDStruct) UnmarshalMsg ¶
func (z *MessageIDStruct) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type MessageIDType ¶
type MessageIDType uint32
func GetMessageID ¶
func GetMessageID() MessageIDType
func (*MessageIDType) DecodeMsg ¶
func (z *MessageIDType) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (MessageIDType) EncodeMsg ¶
func (z MessageIDType) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (MessageIDType) MarshalMsg ¶
func (z MessageIDType) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (MessageIDType) Msgsize ¶
func (z MessageIDType) Msgsize() (s int)
func (*MessageIDType) UnmarshalMsg ¶
func (z *MessageIDType) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type MessageType ¶
type MessageType uint8
const ( // External messages PUBLISHMSG MessageType = iota QUERYMSG SUBSCRIPDIFFMSG BROKERREQUESTMSG // Internal messages BROKERCONNECTMSG FORWARDREQUESTMSG CANCELFORWARDREQUESTMSG BROKERSUBSCRIPDIFFMSG BROKERASSIGNMSG BROKERDEATHMSG CLIENTTERMREQUESTMSG PUBTERMREQUESTMSG REQHEARTBEATMSG HEARTBEATMSG BROKERPUBLISHMSG BROKERQUERYMSG CLIENTTERMMSG PUBTERMMSG BROKERTERMMSG ACKMSG LEADERCHANGEMSG )
func (*MessageType) DecodeMsg ¶
func (z *MessageType) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (MessageType) EncodeMsg ¶
func (z MessageType) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (MessageType) MarshalMsg ¶
func (z MessageType) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (MessageType) Msgsize ¶
func (z MessageType) Msgsize() (s int)
func (*MessageType) UnmarshalMsg ¶
func (z *MessageType) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type MetadataStore ¶
type MetadataStore struct {
// contains filtered or unexported fields
}
This struct handles all communication with the Mongo database that provides metadata storage and query capabilities. The "schema" of the metadata collection is simple. Each document is flat (just k-v pairs) and corresponds to a producer. The producer UUIDv4 is stored in the primary key _id field, and the rest of the document is just the key/value pairs of metadata
func NewMetadataStore ¶
func NewMetadataStore(c *Config) *MetadataStore
func (*MetadataStore) DropDatabase ¶
func (ms *MetadataStore) DropDatabase()
Obviously use carefully - in place only for testing!
func (*MetadataStore) Query ¶
func (ms *MetadataStore) Query(node rootNode) (*Query, error)
func (*MetadataStore) Reevaluate ¶
func (ms *MetadataStore) Reevaluate(query *Query) (added, removed []UUID)
func (*MetadataStore) RemovePublisher ¶
func (ms *MetadataStore) RemovePublisher(uuid UUID) error
type MongoConfig ¶
MongoDB configuration
type ProducerState ¶
type ProducerState uint
const ( ProdStateOld ProducerState = iota ProdStateNew ProdStateSame )
func (*ProducerState) DecodeMsg ¶
func (z *ProducerState) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ProducerState) EncodeMsg ¶
func (z ProducerState) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ProducerState) MarshalMsg ¶
func (z ProducerState) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ProducerState) Msgsize ¶
func (z ProducerState) Msgsize() (s int)
func (*ProducerState) UnmarshalMsg ¶
func (z *ProducerState) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PublishMessage ¶
type PublishMessage struct { UUID UUID Metadata map[string]interface{} Value interface{} L sync.RWMutex `msg:"-"` }
func (*PublishMessage) DecodeMsg ¶
func (z *PublishMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*PublishMessage) EncodeMsg ¶
func (z *PublishMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*PublishMessage) FromArray ¶
func (m *PublishMessage) FromArray(array []interface{}) error
func (*PublishMessage) FromBroker ¶
func (m *PublishMessage) FromBroker(bpm *BrokerPublishMessage)
func (*PublishMessage) IsEmpty ¶
func (m *PublishMessage) IsEmpty() bool
func (*PublishMessage) Marshal ¶
func (m *PublishMessage) Marshal() ([]byte, error)
func (*PublishMessage) MarshalMsg ¶
func (z *PublishMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*PublishMessage) Msgsize ¶
func (z *PublishMessage) Msgsize() (s int)
func (*PublishMessage) ToBroker ¶
func (m *PublishMessage) ToBroker() *BrokerPublishMessage
func (*PublishMessage) UnmarshalMsg ¶
func (z *PublishMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PublisherTerminationMessage ¶
type PublisherTerminationMessage struct { MessageIDStruct // the publisher that has left PublisherID UUID }
Sent from broker -> coordinator when a publisher connection is terminated
func (*PublisherTerminationMessage) Copy ¶
func (m *PublisherTerminationMessage) Copy() SendableWithID
func (*PublisherTerminationMessage) DecodeMsg ¶
func (z *PublisherTerminationMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*PublisherTerminationMessage) Encode ¶
func (m *PublisherTerminationMessage) Encode(enc *msgp.Writer) error
func (*PublisherTerminationMessage) EncodeMsg ¶
func (z *PublisherTerminationMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*PublisherTerminationMessage) Marshal ¶
func (m *PublisherTerminationMessage) Marshal() ([]byte, error)
func (*PublisherTerminationMessage) MarshalMsg ¶
func (z *PublisherTerminationMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*PublisherTerminationMessage) Msgsize ¶
func (z *PublisherTerminationMessage) Msgsize() (s int)
func (*PublisherTerminationMessage) UnmarshalMsg ¶
func (z *PublisherTerminationMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PublisherTerminationRequest ¶
type PublisherTerminationRequest struct { MessageIDStruct PublisherIDs []UUID }
**** PublisherTerminationRequest **** Sent from coordinator -> broker when coordinator wants the broker to break the connection with a specific publisher (i.e., when the broker is a failover and the local broker comes back online)
func (*PublisherTerminationRequest) Copy ¶
func (m *PublisherTerminationRequest) Copy() SendableWithID
func (*PublisherTerminationRequest) DecodeMsg ¶
func (z *PublisherTerminationRequest) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*PublisherTerminationRequest) Encode ¶
func (m *PublisherTerminationRequest) Encode(enc *msgp.Writer) error
func (*PublisherTerminationRequest) EncodeMsg ¶
func (z *PublisherTerminationRequest) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*PublisherTerminationRequest) Marshal ¶
func (m *PublisherTerminationRequest) Marshal() ([]byte, error)
func (*PublisherTerminationRequest) MarshalMsg ¶
func (z *PublisherTerminationRequest) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*PublisherTerminationRequest) Msgsize ¶
func (z *PublisherTerminationRequest) Msgsize() (s int)
func (*PublisherTerminationRequest) UnmarshalMsg ¶
func (z *PublisherTerminationRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Query ¶
type QueryMessage ¶
**** QueryMessage **** Client starts a query with this
func (*QueryMessage) DecodeMsg ¶
func (z *QueryMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (QueryMessage) EncodeMsg ¶
func (z QueryMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*QueryMessage) Marshal ¶
func (m *QueryMessage) Marshal() ([]byte, error)
func (QueryMessage) MarshalMsg ¶
func (z QueryMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (QueryMessage) Msgsize ¶
func (z QueryMessage) Msgsize() (s int)
func (*QueryMessage) UnmarshalMsg ¶
func (z *QueryMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type RequestHeartbeatMessage ¶
type RequestHeartbeatMessage struct{}
func (*RequestHeartbeatMessage) Encode ¶
func (m *RequestHeartbeatMessage) Encode(enc *msgp.Writer) error
func (*RequestHeartbeatMessage) Marshal ¶
func (m *RequestHeartbeatMessage) Marshal() ([]byte, error)
type Sendable ¶
func MessageFromBytes ¶
type SendableWithID ¶
type SendableWithID interface { Encode(enc *msgp.Writer) error Marshal() (o []byte, err error) GetID() MessageIDType SetID(MessageIDType) Copy() SendableWithID }
type ServerConfig ¶
type ServerConfig struct { // if true, listens on 0.0.0.0 Global bool // Client Interface Port int // the public-facing address of the broker Host string // A unique key for this Broker BrokerID UUID // the name of the coordinator server CoordinatorHost string // the port of the coordinator server CoordinatorPort int // if true, then the broker evaluates metadata locally // (distribution option #2). If false, then it forwards // queries to the coordinator (distribution option #1). // Note that if running in single-node mode, without // a coordinator, this must be TRUE. LocalEvaluation bool }
server configuration
type SubscriptionDiffMessage ¶
//////////////////////////////////// **** SubscriptionDiff Message **** ////////////////////////////////////
func (*SubscriptionDiffMessage) DecodeMsg ¶
func (z *SubscriptionDiffMessage) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*SubscriptionDiffMessage) Encode ¶
func (m *SubscriptionDiffMessage) Encode(enc *msgp.Writer) error
func (SubscriptionDiffMessage) EncodeMsg ¶
func (z SubscriptionDiffMessage) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*SubscriptionDiffMessage) FromProducerState ¶
func (m *SubscriptionDiffMessage) FromProducerState(state map[UUID]ProducerState)
func (*SubscriptionDiffMessage) Marshal ¶
func (m *SubscriptionDiffMessage) Marshal() ([]byte, error)
func (SubscriptionDiffMessage) MarshalMsg ¶
func (z SubscriptionDiffMessage) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (SubscriptionDiffMessage) Msgsize ¶
func (z SubscriptionDiffMessage) Msgsize() (s int)
func (*SubscriptionDiffMessage) UnmarshalMsg ¶
func (z *SubscriptionDiffMessage) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler