mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-08 08:54:29 +01:00
58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
// Copyright (c) 2016 Intel Corporation
|
|
// Copyright (c) 2019 Huawei Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package persistapi
|
|
|
|
// ============= sandbox level resources =============
|
|
|
|
// AgentState save agent state data
|
|
type AgentState struct {
|
|
// Pid of proxy process
|
|
ProxyPid int
|
|
|
|
// URL to connect to agent
|
|
URL string
|
|
}
|
|
|
|
// SandboxState contains state information of sandbox
|
|
// nolint: maligned
|
|
type SandboxState struct {
|
|
// PersistVersion of persist data format, can be used for keeping compatibility later
|
|
PersistVersion uint
|
|
|
|
// State is sandbox running status
|
|
State string
|
|
|
|
// GuestMemoryBlockSizeMB is the size of memory block of guestos
|
|
GuestMemoryBlockSizeMB uint32
|
|
|
|
// GuestMemoryHotplugProbe determines whether guest kernel supports memory hotplug probe interface
|
|
GuestMemoryHotplugProbe bool
|
|
|
|
// SandboxContainer specifies which container is used to start the sandbox/vm
|
|
SandboxContainer string
|
|
|
|
// CgroupPath is the cgroup hierarchy where sandbox's processes
|
|
// including the hypervisor are placed.
|
|
// FIXME: sandbox can reuse "SandboxContainer"'s CgroupPath so we can remove this field.
|
|
CgroupPath string
|
|
|
|
// Devices plugged to sandbox(hypervisor)
|
|
Devices []DeviceState
|
|
|
|
// HypervisorState saves hypervisor specific data
|
|
HypervisorState HypervisorState
|
|
|
|
// AgentState saves state data of agent
|
|
AgentState AgentState
|
|
|
|
// Network saves network configuration of sandbox
|
|
Network NetworkInfo
|
|
|
|
// Config saves config information of sandbox
|
|
Config SandboxConfig
|
|
}
|