watch

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Kubeconfig          string `yaml:"kubeconfig"`
	NamespaceBlackRegex string `yaml:"namespace_blacklist_regex"`
	Labels              Labels `yaml:"labels"`
}

Config to create a watcher

type Event

type Event struct {
	Route  *routev1.Route
	Type   EventType
	Labels Labels
}

Event is a wrapper to provide the Openshift event and the labels of the Watcher

type EventType added in v0.2.0

type EventType int

EventType

const (
	Added EventType = iota + 1
	Modified
	Deleted
)

type Labels

type Labels map[string]string

Labels

type MultiWatcher

type MultiWatcher struct {
	Sink chan Event
	// contains filtered or unexported fields
}

Multiwatcher

func NewMultiWatcher

func NewMultiWatcher(configs []Config) (mw *MultiWatcher, err error)

NewMultiWatcher creates a watcher for multiple configs into one chan

func (*MultiWatcher) Watch

func (mw *MultiWatcher) Watch(ctx context.Context)

Watch nonblocking all Watchers and throw them into a single mw.Sink

type Watcher

type Watcher struct {
	Labels              Labels
	Cancelled           bool
	NamespaceBlackRegex *regexp.Regexp
	// contains filtered or unexported fields
}

Watcher

func NewWatcher

func NewWatcher(c Config) (w *Watcher, err error)

NewWatcher crates a Wachter

func (*Watcher) Watch

func (w *Watcher) Watch(ctx context.Context) (c chan Event, err error)

Watch nonblocking all events from openshift and throw them into c

Jump to

Keyboard shortcuts

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