Documentation ¶
Index ¶
- type DevicePlugin
- func (m *DevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (m *DevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (m *DevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
- func (m *DevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (m *DevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (m *DevicePlugin) Register(kubeletEndpoint, resourceName string) error
- func (m *DevicePlugin) Serve() error
- func (m *DevicePlugin) Start() error
- func (m *DevicePlugin) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DevicePlugin ¶
DevicePlugin implements the Kubernetes device plugin API
func NewDevicePlugin ¶
func NewDevicePlugin() (*DevicePlugin, error)
NewDevicePlugin returns an initialized DevicePlugin
func (*DevicePlugin) Allocate ¶
func (m *DevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*DevicePlugin) GetDevicePluginOptions ¶
func (m *DevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
func (*DevicePlugin) GetPreferredAllocation ¶
func (m *DevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
func (*DevicePlugin) ListAndWatch ¶
func (m *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 (m *DevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
func (*DevicePlugin) Register ¶
func (m *DevicePlugin) Register(kubeletEndpoint, resourceName string) error
Register registers the device plugin for the given resourceName with Kubelet.
func (*DevicePlugin) Serve ¶
func (m *DevicePlugin) Serve() error
Serve starts the gRPC server and register the device plugin to Kubelet
func (*DevicePlugin) Start ¶
func (m *DevicePlugin) Start() error
Start starts the gRPC server of the device plugin
Click to show internal directories.
Click to hide internal directories.