Documentation ¶
Index ¶
- Constants
- type MicroDeviceServer
- func (s *MicroDeviceServer) Allocate(ctx context.Context, reqs *deviceapi.AllocateRequest) (*deviceapi.AllocateResponse, error)
- func (s *MicroDeviceServer) GetDevicePluginOptions(context.Context, *deviceapi.Empty) (*deviceapi.DevicePluginOptions, error)
- func (s *MicroDeviceServer) GetPreferredAllocation(context.Context, *deviceapi.PreferredAllocationRequest) (*deviceapi.PreferredAllocationResponse, error)
- func (s *MicroDeviceServer) ListAndWatch(e *deviceapi.Empty, srv deviceapi.DevicePlugin_ListAndWatchServer) error
- func (s *MicroDeviceServer) PreStartContainer(context.Context, *deviceapi.PreStartContainerRequest) (*deviceapi.PreStartContainerResponse, error)
- func (s *MicroDeviceServer) RegisterToKubelet() error
- func (s *MicroDeviceServer) Run() error
Constants ¶
View Source
const ( // KubeSocket kubelet unix socket KubeSocket = "kubelet.sock" // PluginPath device defautl path PluginPath = "/var/lib/kubelet/device-plugins/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MicroDeviceServer ¶
type MicroDeviceServer struct {
// contains filtered or unexported fields
}
MicroDeviceServer is a device plugin server
func NewMicroDeviceServer ¶
func NewMicroDeviceServer() *MicroDeviceServer
NewMicroDeviceServer creates a new device plugin server
func (*MicroDeviceServer) Allocate ¶
func (s *MicroDeviceServer) Allocate(ctx context.Context, reqs *deviceapi.AllocateRequest) (*deviceapi.AllocateResponse, error)
Allocate make the device avilable in container
func (*MicroDeviceServer) GetDevicePluginOptions ¶
func (s *MicroDeviceServer) GetDevicePluginOptions(context.Context, *deviceapi.Empty) (*deviceapi.DevicePluginOptions, error)
GetDevicePluginOptions return options for the device plugin
func (*MicroDeviceServer) GetPreferredAllocation ¶
func (s *MicroDeviceServer) GetPreferredAllocation(context.Context, *deviceapi.PreferredAllocationRequest) (*deviceapi.PreferredAllocationResponse, error)
GetPreferredAllocation return the devices chosen for allocation based on the given options
func (*MicroDeviceServer) ListAndWatch ¶
func (s *MicroDeviceServer) ListAndWatch(e *deviceapi.Empty, srv deviceapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch return a stream of list devices and update that stream whenever changes
func (*MicroDeviceServer) PreStartContainer ¶
func (s *MicroDeviceServer) PreStartContainer(context.Context, *deviceapi.PreStartContainerRequest) (*deviceapi.PreStartContainerResponse, error)
PreStartContainer is called during the device plugin pod starting
func (*MicroDeviceServer) RegisterToKubelet ¶
func (s *MicroDeviceServer) RegisterToKubelet() error
RegisterToKubelet registers the micro device plugin with kubelet
func (*MicroDeviceServer) Run ¶
func (s *MicroDeviceServer) Run() error
Run starts the micro device plugin server
Click to show internal directories.
Click to hide internal directories.