Documentation ¶
Index ¶
- func CreateGPUID(path string)
- func GetFileParamUint(Path, File string) uint64
- func InsmodGpuMod()
- func PathExists(path string) bool
- func RmmodGpuMod()
- type KuTokenManager
- func (ktm *KuTokenManager) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (ktm *KuTokenManager) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (ktm *KuTokenManager) GetPreferredAllocation(ctx context.Context, r *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
- func (ktm *KuTokenManager) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (ktm *KuTokenManager) PreStartContainer(ctx context.Context, r *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (ktm *KuTokenManager) Register() error
- func (ktm *KuTokenManager) Run(stopCh, newPodCh chan string)
- func (ktm *KuTokenManager) Start() error
- func (ktm *KuTokenManager) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGPUID ¶
func CreateGPUID(path string)
func GetFileParamUint ¶
func InsmodGpuMod ¶
func InsmodGpuMod()
func PathExists ¶
func RmmodGpuMod ¶
func RmmodGpuMod()
Types ¶
type KuTokenManager ¶
type KuTokenManager struct {
// contains filtered or unexported fields
}
func NewKuTokenManager ¶
func NewKuTokenManager(tokenName string, tokenSize int, socketFile string) *KuTokenManager
func (*KuTokenManager) Allocate ¶
func (ktm *KuTokenManager) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*KuTokenManager) GetDevicePluginOptions ¶
func (ktm *KuTokenManager) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
GetDevicePluginOptions is unimplemented for this plugin
func (*KuTokenManager) GetPreferredAllocation ¶
func (ktm *KuTokenManager) GetPreferredAllocation(ctx context.Context, r *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
GetPreferredAllocation is unimplemented for this plugin
func (*KuTokenManager) ListAndWatch ¶
func (ktm *KuTokenManager) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*KuTokenManager) PreStartContainer ¶
func (ktm *KuTokenManager) PreStartContainer(ctx context.Context, r *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
PreStartContainer is unimplemented for this plugin
func (*KuTokenManager) Register ¶
func (ktm *KuTokenManager) Register() error
Register registers the device plugin for the given tokenName with Kubelet.
func (*KuTokenManager) Run ¶
func (ktm *KuTokenManager) Run(stopCh, newPodCh chan string)
func (*KuTokenManager) Start ¶
func (ktm *KuTokenManager) Start() error
Serve starts the gRPC server of the device plugin.
Click to show internal directories.
Click to hide internal directories.