github.com/kata-containers/runtime@v0.0.0-20210505125100-04f29832a923/virtcontainers/persist/api/sandbox.go (about)

     1  // Copyright (c) 2016 Intel Corporation
     2  // Copyright (c) 2019 Huawei Corporation
     3  //
     4  // SPDX-License-Identifier: Apache-2.0
     5  //
     6  
     7  package persistapi
     8  
     9  // ============= sandbox level resources =============
    10  
    11  // AgentState save agent state data
    12  type AgentState struct {
    13  	// Pid of proxy process
    14  	ProxyPid int
    15  
    16  	// URL to connect to agent
    17  	URL string
    18  }
    19  
    20  // SandboxState contains state information of sandbox
    21  // nolint: maligned
    22  type SandboxState struct {
    23  	// PersistVersion of persist data format, can be used for keeping compatibility later
    24  	PersistVersion uint
    25  
    26  	// State is sandbox running status
    27  	State string
    28  
    29  	// GuestMemoryBlockSizeMB is the size of memory block of guestos
    30  	GuestMemoryBlockSizeMB uint32
    31  
    32  	// GuestMemoryHotplugProbe determines whether guest kernel supports memory hotplug probe interface
    33  	GuestMemoryHotplugProbe bool
    34  
    35  	// SandboxContainer specifies which container is used to start the sandbox/vm
    36  	SandboxContainer string
    37  
    38  	// CgroupPath is the cgroup hierarchy where sandbox's processes
    39  	// including the hypervisor are placed.
    40  	// FIXME: sandbox can reuse "SandboxContainer"'s CgroupPath so we can remove this field.
    41  	CgroupPath string
    42  
    43  	// CgroupPath is the cgroup hierarchy where sandbox's processes
    44  	// including the hypervisor are placed.
    45  	CgroupPaths map[string]string
    46  
    47  	// Devices plugged to sandbox(hypervisor)
    48  	Devices []DeviceState
    49  
    50  	// HypervisorState saves hypervisor specific data
    51  	HypervisorState HypervisorState
    52  
    53  	// AgentState saves state data of agent
    54  	AgentState AgentState
    55  
    56  	// Network saves network configuration of sandbox
    57  	Network NetworkInfo
    58  
    59  	// Config saves config information of sandbox
    60  	Config SandboxConfig
    61  }