resources

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DAEMONSET const used by registration process
	DAEMONSET = "daemonset"
)
View Source
const (
	// DEPLOYMENT const used by registration process
	DEPLOYMENT = "deployment"
)
View Source
const (
	// INGRESS const used by registration process
	INGRESS = "ingress"
)
View Source
const (
	// SERVICE const used by registration process
	SERVICE = "service"
)
View Source
const (
	// STATEFULSET const used by registration process
	STATEFULSET = "statefulset"
)

Variables

This section is empty.

Functions

func GetResourceWatcherList

func GetResourceWatcherList(
	resourcesFuncList []func(ResourceWatcherArgs) watcher.ResourceWatcher,
	args ResourceWatcherArgs) []watcher.ResourceWatcher

GetResourceWatcherList return the list of configured resources

func GetResourcesFuncListFromConfig

func GetResourcesFuncListFromConfig(c *config.Config) ([]func(ResourceWatcherArgs) watcher.ResourceWatcher, error)

GetResourcesFuncListFromConfig return list of resource objects from configuration

func NewDaemonsetWatcher

func NewDaemonsetWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher

NewDaemonsetWatcher return a watcher for k8s daemonset

func NewDeploymentWatcher

func NewDeploymentWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher

NewDeploymentWatcher return a watcher for k8s deployments

func NewIngressWatcher

func NewIngressWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher

NewIngressWatcher return a watcher for k8s ingress TODO: From 1.14 extensions/v1beta1 apigroup is deprecated in favour of networking.k8s.io ideally we should handle this api group change transparently for users, although old users will eventually have to migrate over new versions of kwatchman with the new type and a go-client version compatible

func NewServiceWatcher

func NewServiceWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher

NewServiceWatcher return a watcher for k8s services

func NewStatefulsetWatcher

func NewStatefulsetWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher

NewStatefulsetWatcher return a watcher for k8s statefulsets

Types

type K8sResourceWatcher

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

K8sResourceWatcher represent the resourceWatcher

func (*K8sResourceWatcher) Run

func (r *K8sResourceWatcher) Run() error

Run the resource watcher

func (*K8sResourceWatcher) Shutdown

func (r *K8sResourceWatcher) Shutdown()

Shutdown the resource watcher

type ResourceWatcherArgs

type ResourceWatcherArgs struct {
	Clientset       kubernetes.Interface
	Namespace       string
	LabelSelector   string
	ChainOfHandlers handler.ChainOfHandlers
}

ResourceWatcherArgs hold the arguments passed to instantiate resources watchers

Jump to

Keyboard shortcuts

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