Documentation ¶
Index ¶
- Constants
- type ZCRYPTDevicePlugin
- func (dpi *ZCRYPTDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (ZCRYPTDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (dpi *ZCRYPTDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (ZCRYPTDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- type ZCRYPTLister
Constants ¶
const ( ZCRYPTPath = "/dev/z90crypt" ZCRYPTName = "zcrypt" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZCRYPTDevicePlugin ¶
type ZCRYPTDevicePlugin struct {
// contains filtered or unexported fields
}
ZCRYPTDevicePlugin is an implementation of DevicePlugin that is capable of exposing /dev/z90crypt to containers.
func (*ZCRYPTDevicePlugin) Allocate ¶
func (dpi *ZCRYPTDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate allocates a set of devices to be used by container runtime environment.
func (ZCRYPTDevicePlugin) GetDevicePluginOptions ¶
func (ZCRYPTDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
GetDevicePluginOptions returns options to be communicated with Device Manager
func (*ZCRYPTDevicePlugin) ListAndWatch ¶
func (dpi *ZCRYPTDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch sends gRPC stream of devices.
func (ZCRYPTDevicePlugin) PreStartContainer ¶
func (ZCRYPTDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
PreStartContainer is called, if indicated by Device Plugin during registeration phase, before each container start. Device plugin can run device specific operations such as reseting the device before making devices available to the container
type ZCRYPTLister ¶
type ZCRYPTLister struct{}
ZCRYPTLister is the object responsible for discovering initial pool of devices and their allocation.
func (ZCRYPTLister) Discover ¶
func (ZCRYPTLister) Discover(pluginListCh chan dpm.PluginNameList)
Discovery discovers all ZCRYPT devices within the system.
func (ZCRYPTLister) GetResourceNamespace ¶
func (ZCRYPTLister) GetResourceNamespace() string
func (ZCRYPTLister) NewPlugin ¶
func (ZCRYPTLister) NewPlugin(deviceID string) dpm.PluginInterface
NewPlugin initializes new device plugin with ZCRYPT specific attributes.