mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-24 01:24:26 +01:00
devices: remove interface VhostUserDevice
The interface "VhostUserDevice" has duplicate functions and fields with Device, so we can merge them into one interface and manage them with one group of interfaces. Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
This commit is contained in:
@@ -35,17 +35,8 @@ type DeviceReceiver interface {
|
||||
GetAndSetSandboxBlockIndex() (int, error)
|
||||
DecrementSandboxBlockIndex() error
|
||||
|
||||
// this is for vhost_user devices
|
||||
AddVhostUserDevice(VhostUserDevice, config.DeviceType) error
|
||||
}
|
||||
|
||||
// VhostUserDevice represents a vhost-user device. Shared
|
||||
// attributes of a vhost-user device can be retrieved using
|
||||
// the Attrs() method. Unique data can be obtained by casting
|
||||
// the object to the proper type.
|
||||
type VhostUserDevice interface {
|
||||
Attrs() *config.VhostUserDeviceAttrs
|
||||
Type() config.DeviceType
|
||||
// this is for appending device to hypervisor boot params
|
||||
AppendDevice(Device) error
|
||||
}
|
||||
|
||||
// Device is the virtcontainers device interface.
|
||||
|
||||
Reference in New Issue
Block a user