Documentation ¶
Index ¶
- Constants
- type UNIDevicePlugin
- func (m *UNIDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (m *UNIDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (m *UNIDevicePlugin) GetPreferredAllocation(ctx context.Context, req *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
- func (m *UNIDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (m *UNIDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (m *UNIDevicePlugin) Register(request pluginapi.RegisterRequest) error
- func (m *UNIDevicePlugin) Serve(resourceName string) error
- func (m *UNIDevicePlugin) Start() error
- func (m *UNIDevicePlugin) Stop() error
Constants ¶
View Source
const (
ResourceName = "ucloud.cn/uni"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UNIDevicePlugin ¶
UNIDevicePlugin implements the Kubernetes device plugin API
func NewUNIDevicePlugin ¶
func NewUNIDevicePlugin(count int) *UNIDevicePlugin
NewUNIDevicePlugin returns an initialized UNIDevicePlugin
func (*UNIDevicePlugin) Allocate ¶
func (m *UNIDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*UNIDevicePlugin) GetDevicePluginOptions ¶
func (m *UNIDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
GetDevicePluginOptions return device plugin options
func (*UNIDevicePlugin) GetPreferredAllocation ¶
func (m *UNIDevicePlugin) GetPreferredAllocation(ctx context.Context, req *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
func (*UNIDevicePlugin) ListAndWatch ¶
func (m *UNIDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*UNIDevicePlugin) PreStartContainer ¶
func (m *UNIDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
PreStartContainer return container prestart hook
func (*UNIDevicePlugin) Register ¶
func (m *UNIDevicePlugin) Register(request pluginapi.RegisterRequest) error
Register registers the device plugin for the given resourceName with Kubelet.
func (*UNIDevicePlugin) Serve ¶
func (m *UNIDevicePlugin) Serve(resourceName string) error
Serve starts the gRPC server and register the device plugin to Kubelet
func (*UNIDevicePlugin) Start ¶
func (m *UNIDevicePlugin) Start() error
Start starts the gRPC server of the device plugin
Click to show internal directories.
Click to hide internal directories.