Documentation
¶
Index ¶
- Variables
- func DriverStatuses() map[instancetype.Type]*DriverStatus
- func GetClusterCPUFlags(ctx context.Context, s *state.State, servers []string, archName string) ([]string, error)
- func ImageMetadataDir(instancePath string) string
- func ParseMemoryStr(memory string) (valueInt int64, err error)
- func PrepareEqualTest(insts ...instance.Instance)
- type DriverStatus
- type OCINetworkInterface
Constants ¶
This section is empty.
Variables ¶
var ErrExecCommandNotExecutable = api.StatusErrorf(http.StatusBadRequest, "Command not executable")
ErrExecCommandNotExecutable indicates the command is not executable.
var ErrExecCommandNotFound = api.StatusErrorf(http.StatusBadRequest, "Command not found")
ErrExecCommandNotFound indicates the command is not found.
var ErrExecDisconnected = errors.New("Disconnected")
ErrExecDisconnected is returned when the guest disconnects the exec session.
var ErrInstanceIsStopped error = api.StatusErrorf(http.StatusBadRequest, "The instance is already stopped")
ErrInstanceIsStopped indicates that the instance is stopped.
Functions ¶
func DriverStatuses ¶
func DriverStatuses() map[instancetype.Type]*DriverStatus
DriverStatuses returns a map of DriverStatus structs for all instance type drivers. The first time this function is called each of the instance drivers will be probed for support and the result will be cached internally to make subsequent calls faster.
func GetClusterCPUFlags ¶
func GetClusterCPUFlags(ctx context.Context, s *state.State, servers []string, archName string) ([]string, error)
GetClusterCPUFlags returns the list of shared CPU flags across.
func ImageMetadataDir ¶ added in v7.3.0
ImageMetadataDir returns the metadata image directory for the given instance path.
func ParseMemoryStr ¶
ParseMemoryStr parses a human representation of memory value as int64 type.
func PrepareEqualTest ¶
PrepareEqualTest modifies any unexported variables required for reflect.DeepEqual to complete safely. This is used for tests to avoid infinite recursion loops.
Types ¶
type DriverStatus ¶
DriverStatus definition.
type OCINetworkInterface ¶ added in v7.3.0
type OCINetworkInterface struct {
DHCP4 bool `json:"dhcp4"`
DHCP6 bool `json:"dhcp6"`
Route4 bool `json:"route4"`
Route6 bool `json:"route6"`
}
OCINetworkInterface is the expected network configuration for an OCI container interface. It is consumed by the forknet dhcp process through the container's interfaces.json file.