mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-08 00:44:25 +01:00
`CgroupPaths` is a map that saves the cgroup type and path that were used for the sandbox to create the cgroups `Cgroups` contains information about sandbox's cgroups and its constraints. Both variables can be used to create a cgroup configuration needed to manipulate cgroups in the host. currently kata uses `containerd/cgroups` and `libcontainer` to create cgroups. `CgroupPaths` will replace to `CgroupPath` once kata uses *only* `libcontainer` Signed-off-by: Julio Montes <julio.montes@intel.com>
62 lines
1.6 KiB
Go
62 lines
1.6 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
|
|
|
|
// CgroupPath is the cgroup hierarchy where sandbox's processes
|
|
// including the hypervisor are placed.
|
|
CgroupPaths map[string]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
|
|
}
|