Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBroadcaster ¶
type EventBroadcaster struct {
// contains filtered or unexported fields
}
EventBroadcaster is a component that can broadcast resource status change events to registered clients.
func NewEventBroadcaster ¶
func NewEventBroadcaster() *EventBroadcaster
NewEventBroadcaster creates a new event broadcaster.
func (*EventBroadcaster) Broadcast ¶
func (h *EventBroadcaster) Broadcast(res *api.Resource)
Broadcast broadcasts a resource status change event to all registered clients.
func (*EventBroadcaster) Register ¶
func (h *EventBroadcaster) Register(source string, handler resourceHandler) (string, <-chan error)
Register registers a client and return client id and error channel.
func (*EventBroadcaster) Start ¶
func (h *EventBroadcaster) Start(ctx context.Context)
Start starts the event broadcaster and waits for events to broadcast.
func (*EventBroadcaster) Unregister ¶
func (h *EventBroadcaster) Unregister(id string)
Unregister unregisters a client by id
Click to show internal directories.
Click to hide internal directories.