Documentation ¶
Index ¶
- Constants
- type ENIDevicePlugin
- func (m *ENIDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (m *ENIDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (m *ENIDevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
- func (m *ENIDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (m *ENIDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (m *ENIDevicePlugin) Register(request pluginapi.RegisterRequest) error
- func (m *ENIDevicePlugin) Serve()
- func (m *ENIDevicePlugin) Start() error
- func (m *ENIDevicePlugin) Stop() error
Constants ¶
View Source
const ( ENITypeENI = "eni" ENITypeMember = "member" ENITypeERDMA = "erdma" // ENIResName aliyun eni resource name in kubernetes container resource ENIResName = "aliyun/eni" MemberENIResName = "aliyun/member-eni" ERDMAResName = "aliyun/erdma" )
define resource name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ENIDevicePlugin ¶ added in v1.1.0
ENIDevicePlugin implements the Kubernetes device plugin API
func NewENIDevicePlugin ¶ added in v1.1.0
func NewENIDevicePlugin(count int, eniType string) *ENIDevicePlugin
NewENIDevicePlugin returns an initialized ENIDevicePlugin
func (*ENIDevicePlugin) Allocate ¶ added in v1.1.0
func (m *ENIDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*ENIDevicePlugin) GetDevicePluginOptions ¶ added in v1.1.0
func (m *ENIDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
GetDevicePluginOptions return device plugin options
func (*ENIDevicePlugin) GetPreferredAllocation ¶ added in v1.1.0
func (m *ENIDevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
func (*ENIDevicePlugin) ListAndWatch ¶ added in v1.1.0
func (m *ENIDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*ENIDevicePlugin) PreStartContainer ¶ added in v1.1.0
func (m *ENIDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
PreStartContainer return container prestart hook
func (*ENIDevicePlugin) Register ¶ added in v1.1.0
func (m *ENIDevicePlugin) Register(request pluginapi.RegisterRequest) error
Register registers the device plugin for the given resourceName with Kubelet.
func (*ENIDevicePlugin) Serve ¶ added in v1.1.0
func (m *ENIDevicePlugin) Serve()
Serve starts the gRPC server and register the device plugin to Kubelet
func (*ENIDevicePlugin) Start ¶ added in v1.1.0
func (m *ENIDevicePlugin) Start() error
Start starts the gRPC server of the device plugin
func (*ENIDevicePlugin) Stop ¶ added in v1.1.0
func (m *ENIDevicePlugin) Stop() error
Stop stops the gRPC server
Click to show internal directories.
Click to hide internal directories.