kubernetesk8s.io/kubernetes/pkg/kubelet/util/pluginwatcher Index | Files | Directories

package pluginwatcher

import "k8s.io/kubernetes/pkg/kubelet/util/pluginwatcher"

Index

Functions

func NewExampleHandler

func NewExampleHandler() *exampleHandler

NewExampleHandler provide a example handler

func NewExamplePlugin

func NewExamplePlugin() *examplePlugin

NewExamplePlugin returns an initialized examplePlugin instance

func NewTestExamplePlugin

func NewTestExamplePlugin(pluginName string, pluginType string, endpoint string) *examplePlugin

NewTestExamplePlugin returns an initialized examplePlugin instance for testing

Types

type RegisterCallbackFn

type RegisterCallbackFn func(pluginName string, endpoint string, versions []string, socketPath string) (chan bool, error)

RegisterCallbackFn is the type of the callback function that handlers will provide

type Watcher

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

Watcher is the plugin watcher

func NewWatcher

func NewWatcher(sockDir string) Watcher

NewWatcher provides a new watcher

func (*Watcher) AddHandler

func (w *Watcher) AddHandler(pluginType string, handlerCbkFn RegisterCallbackFn)

AddHandler registers a callback to be invoked for a particular type of plugin

func (*Watcher) Cleanup

func (w *Watcher) Cleanup() error

Cleanup cleans the path by removing sockets

func (*Watcher) Start

func (w *Watcher) Start() error

Start watches for the creation of plugin sockets at the path

func (*Watcher) Stop

func (w *Watcher) Stop() error

Stop stops probing the creation of plugin sockets at the path

Source Files

example_handler.go example_plugin.go plugin_watcher.go

Directories

PathSynopsis
pkg/kubelet/util/pluginwatcher/example_plugin_apis
pkg/kubelet/util/pluginwatcher/example_plugin_apis/v1beta1Package v1beta1 is a generated protocol buffer package.
pkg/kubelet/util/pluginwatcher/example_plugin_apis/v1beta2Package v1beta2 is a generated protocol buffer package.
Version
v1.13.0-alpha.0
Published
Aug 14, 2018
Platform
js/wasm
Imports
16 packages
Last checked
1 minute ago

Tools for package owners.