subscription

package
v0.0.0-...-f0c486d Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISubscription

type ISubscription interface {
	OnEvent(msg Message)
	WithElectedResource() interface{}
	// Return an empty array for all event types or selective set an event type to filter for
	//Added    EventType = "ADDED"
	//Modified EventType = "MODIFIED"
	//Deleted  EventType = "DELETED"
	//Bookmark EventType = "BOOKMARK"
	//Error    EventType = "ERROR"
	WithEventType() []watch.EventType
}

type Message

type Message struct {
	Client kubernetes.Interface
	Event  watch.Event
}

type Registry

type Registry struct {
	Subscriptions []ISubscription
}

func (*Registry) Add

func (r *Registry) Add(subscription ISubscription) error

func (*Registry) OnEvent

func (r *Registry) OnEvent(msg Message) error

Jump to

Keyboard shortcuts

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