examples

package
v1.15.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultipointCommunicatingPlugin

type MultipointCommunicatingPlugin struct{}

MultipointCommunicatingPlugin is an example of a plugin that implements two extension points. It communicates through pluginContext with another function.

func NewMultipointCommunicatingPlugin

func NewMultipointCommunicatingPlugin() *MultipointCommunicatingPlugin

NewMultipointCommunicatingPlugin initializes a new plugin and returns it.

func (MultipointCommunicatingPlugin) Name

Name returns name of the plugin. It is used in logs, etc.

func (MultipointCommunicatingPlugin) Prebind

func (mc MultipointCommunicatingPlugin) Prebind(ps plugins.PluginSet, pod *v1.Pod, nodeName string) (bool, error)

Prebind is the functions invoked by the framework at "prebind" extension point.

func (MultipointCommunicatingPlugin) Reserve

func (mc MultipointCommunicatingPlugin) Reserve(ps plugins.PluginSet, pod *v1.Pod, nodeName string) error

Reserve is the functions invoked by the framework at "reserve" extension point.

type StatefulMultipointExample

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

StatefulMultipointExample is an example plugin that is executed at multiple extension points. This plugin is stateful. It receives arguments at initialization (NewMultipointPlugin) and changes its state when it is executed.

func NewStatefulMultipointExample

func NewStatefulMultipointExample(initState ...interface{}) *StatefulMultipointExample

NewStatefulMultipointExample initializes a new plugin and returns it.

func (*StatefulMultipointExample) Name

func (mp *StatefulMultipointExample) Name() string

Name returns name of the plugin. It is used in logs, etc.

func (*StatefulMultipointExample) Prebind

func (mp *StatefulMultipointExample) Prebind(ps plugins.PluginSet, pod *v1.Pod, nodeName string) (bool, error)

Prebind is the functions invoked by the framework at "prebind" extension point.

func (*StatefulMultipointExample) Reserve

func (mp *StatefulMultipointExample) Reserve(ps plugins.PluginSet, pod *v1.Pod, nodeName string) error

Reserve is the functions invoked by the framework at "reserve" extension point.

type StatelessPrebindExample

type StatelessPrebindExample struct{}

StatelessPrebindExample is an example of a simple plugin that has no state and implements only one hook for prebind.

func NewStatelessPrebindExample

func NewStatelessPrebindExample() *StatelessPrebindExample

NewStatelessPrebindExample initializes a new plugin and returns it.

func (StatelessPrebindExample) Name

func (sr StatelessPrebindExample) Name() string

Name returns name of the plugin. It is used in logs, etc.

func (StatelessPrebindExample) Prebind

func (sr StatelessPrebindExample) Prebind(ps plugins.PluginSet, pod *v1.Pod, nodeName string) (bool, error)

Prebind is the functions invoked by the framework at "prebind" extension point.

Jump to

Keyboard shortcuts

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