Documentation
¶
Index ¶
- type CustomDevicePlugin
- type CustomDevicePluginStub
- func (c CustomDevicePluginStub) AllocateAssociatedDevice(_ context.Context, resReq *pluginapi.ResourceRequest, ...) (*pluginapi.AssociatedDeviceAllocationResponse, error)
- func (c CustomDevicePluginStub) DefaultPreAllocateResourceName() string
- func (c CustomDevicePluginStub) DeviceNames() []string
- func (c CustomDevicePluginStub) GetAssociatedDeviceTopologyHints(context.Context, *pluginapi.AssociatedDeviceRequest) (*pluginapi.AssociatedDeviceHintsResponse, error)
- func (c CustomDevicePluginStub) UpdateAllocatableAssociatedDevices(context.Context, *pluginapi.UpdateAllocatableAssociatedDevicesRequest) (*pluginapi.UpdateAllocatableAssociatedDevicesResponse, error)
- type CustomDevicePluginStub2
- func (c CustomDevicePluginStub2) AllocateAssociatedDevice(_ context.Context, resReq *pluginapi.ResourceRequest, ...) (*pluginapi.AssociatedDeviceAllocationResponse, error)
- func (c CustomDevicePluginStub2) DefaultPreAllocateResourceName() string
- func (c CustomDevicePluginStub2) DeviceNames() []string
- func (c CustomDevicePluginStub2) GetAssociatedDeviceTopologyHints(context.Context, *pluginapi.AssociatedDeviceRequest) (*pluginapi.AssociatedDeviceHintsResponse, error)
- func (c CustomDevicePluginStub2) UpdateAllocatableAssociatedDevices(context.Context, *pluginapi.UpdateAllocatableAssociatedDevicesRequest) (*pluginapi.UpdateAllocatableAssociatedDevicesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomDevicePlugin ¶
type CustomDevicePlugin interface {
// DeviceNames returns a list of all possible names for this device
DeviceNames() []string
GetAssociatedDeviceTopologyHints(ctx context.Context, request *pluginapi.AssociatedDeviceRequest) (*pluginapi.AssociatedDeviceHintsResponse, error)
UpdateAllocatableAssociatedDevices(ctx context.Context, request *pluginapi.UpdateAllocatableAssociatedDevicesRequest) (*pluginapi.UpdateAllocatableAssociatedDevicesResponse, error)
// DefaultPreAllocateResourceName returns the default resource name that must be allocated first before this device is allocated
DefaultPreAllocateResourceName() string
AllocateAssociatedDevice(
ctx context.Context, resReq *pluginapi.ResourceRequest, deviceReq *pluginapi.DeviceRequest, accompanyResourceName string,
) (*pluginapi.AssociatedDeviceAllocationResponse, error)
}
func NewCustomDevicePluginStub ¶
func NewCustomDevicePluginStub(base *baseplugin.BasePlugin) CustomDevicePlugin
func NewCustomDevicePluginStub2 ¶
func NewCustomDevicePluginStub2(base *baseplugin.BasePlugin) CustomDevicePlugin
type CustomDevicePluginStub ¶
type CustomDevicePluginStub struct {
*baseplugin.BasePlugin
}
func (CustomDevicePluginStub) AllocateAssociatedDevice ¶
func (c CustomDevicePluginStub) AllocateAssociatedDevice(_ context.Context, resReq *pluginapi.ResourceRequest, _ *pluginapi.DeviceRequest, accompanyResourceName string) (*pluginapi.AssociatedDeviceAllocationResponse, error)
func (CustomDevicePluginStub) DefaultPreAllocateResourceName ¶
func (c CustomDevicePluginStub) DefaultPreAllocateResourceName() string
func (CustomDevicePluginStub) DeviceNames ¶
func (c CustomDevicePluginStub) DeviceNames() []string
func (CustomDevicePluginStub) GetAssociatedDeviceTopologyHints ¶
func (c CustomDevicePluginStub) GetAssociatedDeviceTopologyHints(context.Context, *pluginapi.AssociatedDeviceRequest) (*pluginapi.AssociatedDeviceHintsResponse, error)
func (CustomDevicePluginStub) UpdateAllocatableAssociatedDevices ¶
func (c CustomDevicePluginStub) UpdateAllocatableAssociatedDevices(context.Context, *pluginapi.UpdateAllocatableAssociatedDevicesRequest) (*pluginapi.UpdateAllocatableAssociatedDevicesResponse, error)
type CustomDevicePluginStub2 ¶
type CustomDevicePluginStub2 struct {
*baseplugin.BasePlugin
}
func (CustomDevicePluginStub2) AllocateAssociatedDevice ¶
func (c CustomDevicePluginStub2) AllocateAssociatedDevice(_ context.Context, resReq *pluginapi.ResourceRequest, deviceReq *pluginapi.DeviceRequest, _ string) (*pluginapi.AssociatedDeviceAllocationResponse, error)
func (CustomDevicePluginStub2) DefaultPreAllocateResourceName ¶
func (c CustomDevicePluginStub2) DefaultPreAllocateResourceName() string
func (CustomDevicePluginStub2) DeviceNames ¶
func (c CustomDevicePluginStub2) DeviceNames() []string
func (CustomDevicePluginStub2) GetAssociatedDeviceTopologyHints ¶
func (c CustomDevicePluginStub2) GetAssociatedDeviceTopologyHints(context.Context, *pluginapi.AssociatedDeviceRequest) (*pluginapi.AssociatedDeviceHintsResponse, error)
func (CustomDevicePluginStub2) UpdateAllocatableAssociatedDevices ¶
func (c CustomDevicePluginStub2) UpdateAllocatableAssociatedDevices(context.Context, *pluginapi.UpdateAllocatableAssociatedDevicesRequest) (*pluginapi.UpdateAllocatableAssociatedDevicesResponse, error)
Click to show internal directories.
Click to hide internal directories.