watch

package
v3.0.4-beta.0+incompat... Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery interface {
	ServerResourcesForGroupVersion(string) (*metav1.APIResourceList, error)
}

type Registrar

type Registrar struct {
	// contains filtered or unexported fields
}

A Registrar allows a parent to add/remove child watches

func (*Registrar) AddWatch

func (r *Registrar) AddWatch(gvk schema.GroupVersionKind) error

AddWatch registers a watch for the given kind

func (*Registrar) Pause

func (r *Registrar) Pause() error

func (*Registrar) RemoveWatch

func (r *Registrar) RemoveWatch(gvk schema.GroupVersionKind) error

func (*Registrar) ReplaceWatch

func (r *Registrar) ReplaceWatch(gvks []schema.GroupVersionKind) error

func (*Registrar) Unpause

func (r *Registrar) Unpause() error

type WatchManager

type WatchManager struct {
	// contains filtered or unexported fields
}

WatchManager allows us to dynamically configure what kinds are watched

func New

func New(ctx context.Context, cfg *rest.Config) *WatchManager

func (*WatchManager) Close

func (wm *WatchManager) Close()

func (*WatchManager) GetManaged

func (wm *WatchManager) GetManaged() map[string]map[schema.GroupVersionKind]watchVitals

func (*WatchManager) NewRegistrar

func (wm *WatchManager) NewRegistrar(parent string, addFns []func(manager.Manager, schema.GroupVersionKind) error) (*Registrar, error)

func (*WatchManager) Pause

func (wm *WatchManager) Pause() error

Pause the manager to prevent syncing while other things are happening, such as wiping the data cache

func (*WatchManager) Unpause

func (wm *WatchManager) Unpause() error

Unpause the manager and start new watches

Jump to

Keyboard shortcuts

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