mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 04:18:53 +00:00
Fixes: #5995 Placeholder skeleton at this point - implementation will be added after basic build refactoring lands. Signed-off-by: Eric Ernst <eric_ernst@apple.com> Signed-off-by: Danny Canter <danny@dcantah.dev>
27 lines
546 B
Go
27 lines
546 B
Go
// Copyright (c) 2023 Apple Inc.
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package virtcontainers
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// NewHypervisor returns a hypervisor from a hypervisor type.
|
|
func NewHypervisor(hType HypervisorType) (Hypervisor, error) {
|
|
switch hType {
|
|
case VirtframeworkHypervisor:
|
|
return &virtFramework{}, nil
|
|
case MockHypervisor:
|
|
return &mockHypervisor{}, nil
|
|
default:
|
|
return nil, fmt.Errorf("Unknown hypervisor type %s", hType)
|
|
}
|
|
}
|
|
|
|
func availableGuestProtection() (guestProtection, error) {
|
|
return noneProtection, nil
|
|
}
|