Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
The controller manages all VPMem attached devices and guest mounted directories.
It is required that all callers:
1. Obtain a reservation using Reserve().
2. Use the reservation to Mount() to ensure resource availability.
3. Call Unmount() to release the reservation and all resources.
If Mount() fails, the caller must call Unmount() to release the reservation and all resources.
If Unmount() fails, the caller must call Unmount() again until it succeeds to release the reservation and all resources.
func New ¶
func New(maxDevices uint32, vm VMVPMemOps, guest LinuxGuestVPMemOps) *Controller
func (*Controller) Reserve ¶
func (c *Controller) Reserve(ctx context.Context, deviceConfig device.DeviceConfig, mountConfig mount.MountConfig) (uuid.UUID, error)
Reserve creates a referenced counted mapping entry for a VPMem attachment based on the device host path.
If an error is returned from this function, it is guaranteed that no reservation mapping was made and no Unmount() call is necessary to clean up.
type LinuxGuestVPMemOps ¶
type LinuxGuestVPMemOps interface {
mount.LinuxGuestVPMemMounter
mount.LinuxGuestVPMemUnmounter
}
type VMVPMemOps ¶
type VMVPMemOps interface {
device.VMVPMemAdder
device.VMVPMemRemover
}