Documentation ¶
Index ¶
- Constants
- func LivenessProbe(socketPath string) error
- type DevicePlugin
- func (plugin *DevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (plugin *DevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (plugin *DevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
- func (plugin *DevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (plugin *DevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (plugin *DevicePlugin) Register(kubeletEndpoint string) error
- func (plugin *DevicePlugin) ReleaseLocks(context.Context, *locks.LocksRequest) (*locks.LocksResponse, error)
- func (plugin *DevicePlugin) Serve() error
- func (plugin *DevicePlugin) SetLocks(context.Context, *locks.LocksRequest) (*locks.LocksResponse, error)
- func (plugin *DevicePlugin) Start() error
- func (plugin *DevicePlugin) Stop() error
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 ¶
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 ¶
func (plugin *DevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*DevicePlugin) GetDevicePluginOptions ¶
func (plugin *DevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
func (*DevicePlugin) GetPreferredAllocation ¶
func (plugin *DevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
func (*DevicePlugin) ListAndWatch ¶
func (plugin *DevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*DevicePlugin) PreStartContainer ¶
func (plugin *DevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
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 (plugin *DevicePlugin) SetLocks(context.Context, *locks.LocksRequest) (*locks.LocksResponse, error)
func (*DevicePlugin) Start ¶
func (plugin *DevicePlugin) Start() error
Start the gRPC server of the device plugin
Click to show internal directories.
Click to hide internal directories.