api

package
v0.0.0-...-5a1b561 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationName = "io.kubernetes.kubelet.device-plugin"
	ResourceName   = "ydb-disk-manager/hostdev"
	DeviceName     = "disk-manager-hostdev"
	SocketPath     = pluginapi.DevicePluginPath + DeviceName + ".sock"
)

Variables

This section is empty.

Functions

func LivenessProbe

func LivenessProbe(socketPath string) error

dial establishes the gRPC communication with the registered device plugin.

Types

type DevicePlugin

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

DevicePlugin implements the Kubernetes device plugin API

func NewDevicePlugin

func NewDevicePlugin(hostDisks *hostdev.DiskManager) *DevicePlugin

NewDevicePlugin returns an initialized DevicePlugin

func (*DevicePlugin) Allocate

Allocate which return list of devices.

func (*DevicePlugin) GetDevicePluginOptions

func (plugin *DevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)

func (*DevicePlugin) ListAndWatch

ListAndWatch lists devices and update that list according to the health status

func (*DevicePlugin) Register

func (plugin *DevicePlugin) Register(kubeletEndpoint string) error

Register the device plugin for the given resourceName with Kubelet.

func (*DevicePlugin) ReleaseLocks

func (plugin *DevicePlugin) ReleaseLocks(context.Context, *locks.LocksRequest) (*locks.LocksResponse, error)

func (*DevicePlugin) Serve

func (plugin *DevicePlugin) Serve() error

Serve starts the gRPC server and register the device plugin to Kubelet

func (*DevicePlugin) SetLocks

func (*DevicePlugin) Start

func (plugin *DevicePlugin) Start() error

Start the gRPC server of the device plugin

func (*DevicePlugin) Stop

func (plugin *DevicePlugin) Stop() error

Stop the gRPC server

Jump to

Keyboard shortcuts

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