pubsub

package
v0.0.0-...-cf50a51 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLAChan

type CLAChan chan *cp.ClusterLoadAssignment

type Event

type Event struct {
	CLA      []*cp.ClusterLoadAssignment
	Clusters []*cp.Cluster
	Routes   []*cp.RouteConfiguration
}

type EventChan

type EventChan chan *Event

type Hub

type Hub interface {
	Subscribe() *Subscription
	Publish(event *Event)
	Size() int
}

func NewHub

func NewHub() Hub

type Subscription

type Subscription struct {
	ID      uuid.UUID
	Events  EventChan
	OnClose func(uuid.UUID)
}

Subscription is a unique channel of ClusterLoadAssignments

func (Subscription) Accept

func (s Subscription) Accept(e *Event)

func (Subscription) Close

func (s Subscription) Close()

Jump to

Keyboard shortcuts

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