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

package pluginwatcher

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

Index

Constants

const (
	PluginName = "example-plugin"
	PluginType = "example-plugin-type"
)

Functions

func NewExamplePlugin

func NewExamplePlugin() *examplePlugin

NewExamplePlugin returns an initialized examplePlugin instance

func NewTestExamplePlugin

func NewTestExamplePlugin(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) (error, chan bool)

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(handlerType 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_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.11.3
Published
Sep 8, 2018
Platform
js/wasm
Imports
15 packages
Last checked
33 minutes ago

Tools for package owners.