Documentation ¶
Index ¶
- type CpuDevicePlugin
- func (m *CpuDevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (m *CpuDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (m *CpuDevicePlugin) GetPreferredAllocation(ctx context.Context, r *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
- func (m *CpuDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (m *CpuDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (m *CpuDevicePlugin) Register() error
- func (m *CpuDevicePlugin) Serve() error
- func (m *CpuDevicePlugin) Start() error
- func (m *CpuDevicePlugin) Stop() error
- type DevicePlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CpuDevicePlugin ¶
type CpuDevicePlugin struct {
// contains filtered or unexported fields
}
CpuDevicePlugin implements the Kubernetes device plugin API
func NewCpuDevicePlugin ¶
func NewCpuDevicePlugin(resourceName string, socket string) *CpuDevicePlugin
NewCpuDevicePlugin returns an initialized CpuDevicePlugin
func (*CpuDevicePlugin) Allocate ¶
func (m *CpuDevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*CpuDevicePlugin) GetDevicePluginOptions ¶
func (m *CpuDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
GetDevicePluginOptions returns the values of the optional settings for this plugin
func (*CpuDevicePlugin) GetPreferredAllocation ¶
func (m *CpuDevicePlugin) GetPreferredAllocation(ctx context.Context, r *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
GetPreferredAllocation returns the preferred allocation from the set of devices specified in the request
func (*CpuDevicePlugin) ListAndWatch ¶
func (m *CpuDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*CpuDevicePlugin) PreStartContainer ¶
func (m *CpuDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
PreStartContainer is unimplemented for this plugin
func (*CpuDevicePlugin) Register ¶
func (m *CpuDevicePlugin) Register() error
Register registers the device plugin for the given resourceName with Kubelet.
func (*CpuDevicePlugin) Serve ¶
func (m *CpuDevicePlugin) Serve() error
Serve starts the gRPC server of the device plugin.
func (*CpuDevicePlugin) Start ¶
func (m *CpuDevicePlugin) Start() error
Start starts the gRPC server, registers the device plugin with the Kubelet, and starts the device healthchecks.
type DevicePlugin ¶
type DevicePlugin interface { Start() error Stop() error Serve() error Register() error GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error GetPreferredAllocation(ctx context.Context, r *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error) }