Documentation ¶
Overview ¶
Package messaging implements the messaging infrastructure between different components within the control plane.
Index ¶
- Constants
- func GetPubSubTopicForProxyUUID(uuid string) string
- type Broker
- func (b *Broker) BroadcastProxyUpdate()
- func (b *Broker) Done() <-chan struct{}
- func (b *Broker) GetProxyUpdatePubSub() *pubsub.PubSub
- func (b *Broker) GetQueue() workqueue.RateLimitingInterface
- func (b *Broker) GetTotalDispatchedProxyEventCount() uint64
- func (b *Broker) GetTotalQEventCount() uint64
- func (b *Broker) GetTotalQProxyEventCount() uint64
- func (b *Broker) PublishKubeEvent(e events.PubSubMessage)
- func (b *Broker) SubscribeKubeEvents(topics ...string) (chan interface{}, func())
- func (b *Broker) Unsub(pubSub *pubsub.PubSub, ch chan interface{})
Constants ¶
const (
// ProxyUpdateTopic is the topic used to send proxy updates
ProxyUpdateTopic = "proxy-update"
)
Variables ¶
This section is empty.
Functions ¶
func GetPubSubTopicForProxyUUID ¶
GetPubSubTopicForProxyUUID returns the topic on which PubSubMessages specific to a proxy UUID are published
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker implements the message broker functionality
func NewBroker ¶
func NewBroker(stopCh <-chan struct{}) *Broker
NewBroker returns a new message broker instance and starts the internal goroutine to process events added to the workqueue.
func (*Broker) BroadcastProxyUpdate ¶
func (b *Broker) BroadcastProxyUpdate()
BroadcastProxyUpdate enqueues a broadcast to update all proxies.
func (*Broker) Done ¶
func (b *Broker) Done() <-chan struct{}
Done returns a channel that's closed when the broker is shutdown.
func (*Broker) GetProxyUpdatePubSub ¶
GetProxyUpdatePubSub returns the PubSub instance corresponding to proxy update events
func (*Broker) GetQueue ¶
func (b *Broker) GetQueue() workqueue.RateLimitingInterface
GetQueue returns the workqueue instance
func (*Broker) GetTotalDispatchedProxyEventCount ¶
GetTotalDispatchedProxyEventCount returns the total number of events dispatched to subscribed proxies
func (*Broker) GetTotalQEventCount ¶
GetTotalQEventCount returns the total number of events queued throughout the lifetime of the workqueue.
func (*Broker) GetTotalQProxyEventCount ¶
GetTotalQProxyEventCount returns the total number of events read from the workqueue pertaining to proxy updates
func (*Broker) PublishKubeEvent ¶
func (b *Broker) PublishKubeEvent(e events.PubSubMessage)
PublishKubeEvent publishes the event to the kube event pubsub
func (*Broker) SubscribeKubeEvents ¶
SubscribeKubeEvents subscribes to kubernetes events, along with an unsubscribe function.