controller

package
v0.0.0-...-c9a78fb Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Add = iota
	Update
	Delete
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	KubeConf     string
	ResyncPeriod time.Duration
}

type Controller

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

func New

func New(log logger.Logger, config Config, client kubernetes.Interface, handler Handlerer) *Controller

New initializes a new controller which is used to watch namespaces.

func (*Controller) Watch

func (c *Controller) Watch(stopCh chan struct{})

Watch uses the informer to watch for namespace state changes in the cluster.

type Handlerer

type Handlerer interface {
	HandleItem(action int, ns string) error
}

Jump to

Keyboard shortcuts

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