Documentation ¶
Index ¶
- Constants
- type SGXDevicePlugin
- func (m *SGXDevicePlugin) Allocate(ctx context.Context, reqs *devicepluginapi.AllocateRequest) (*devicepluginapi.AllocateResponse, error)
- func (m *SGXDevicePlugin) GetDevicePluginOptions(context.Context, *devicepluginapi.Empty) (*devicepluginapi.DevicePluginOptions, error)
- func (m *SGXDevicePlugin) ListAndWatch(e *devicepluginapi.Empty, s devicepluginapi.DevicePlugin_ListAndWatchServer) error
- func (m *SGXDevicePlugin) PreStartContainer(context.Context, *devicepluginapi.PreStartContainerRequest) (*devicepluginapi.PreStartContainerResponse, error)
- func (m *SGXDevicePlugin) Register(kubeletEndpoint, resourceName string) error
- func (m *SGXDevicePlugin) Serve() error
- func (m *SGXDevicePlugin) Start() error
- func (m *SGXDevicePlugin) Stop() error
Constants ¶
const ( // ResourceNameSGX is resource name registered to kubelet. ResourceNameSGX = vendor + "/sgx_epc_MiB" ServerSock = devicepluginapi.DevicePluginPath + "sgx.sock" STABLE_RUNNING_SECONDS = 3600 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SGXDevicePlugin ¶
type SGXDevicePlugin struct {
// contains filtered or unexported fields
}
SGXDevicePlugin implements the Kubernetes device plugin API: DevicePluginServer.
func NewSGXDevicePlugin ¶
func NewSGXDevicePlugin() (*SGXDevicePlugin, error)
NewSGXDevicePlugin returns an initialized SGXDevicePlugin
func (*SGXDevicePlugin) Allocate ¶
func (m *SGXDevicePlugin) Allocate(ctx context.Context, reqs *devicepluginapi.AllocateRequest) (*devicepluginapi.AllocateResponse, error)
Allocate which return list of devices. Allocate implements DevicePluginServer interface.
func (*SGXDevicePlugin) GetDevicePluginOptions ¶
func (m *SGXDevicePlugin) GetDevicePluginOptions(context.Context, *devicepluginapi.Empty) (*devicepluginapi.DevicePluginOptions, error)
GetDevicePluginOptions implements DevicePluginServer interface. We just do nothing here.
func (*SGXDevicePlugin) ListAndWatch ¶
func (m *SGXDevicePlugin) ListAndWatch(e *devicepluginapi.Empty, s devicepluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status. ListAndWatch implements DevicePluginServer interface.
func (*SGXDevicePlugin) PreStartContainer ¶
func (m *SGXDevicePlugin) PreStartContainer(context.Context, *devicepluginapi.PreStartContainerRequest) (*devicepluginapi.PreStartContainerResponse, error)
PreStartContainer implements DevicePluginServer interface. We just do nothing here.
func (*SGXDevicePlugin) Register ¶
func (m *SGXDevicePlugin) Register(kubeletEndpoint, resourceName string) error
Register registers the device plugin for the given resourceName with Kubelet.
func (*SGXDevicePlugin) Serve ¶
func (m *SGXDevicePlugin) Serve() error
Serve starts the gRPC server and register the device plugin to Kubelet
func (*SGXDevicePlugin) Start ¶
func (m *SGXDevicePlugin) Start() error
Start starts the gRPC server of the device plugin