mirror of https://github.com/k3s-io/k3s
commit
b2d2432291
|
@ -191,8 +191,6 @@ pkg/kubelet/checkpointmanager/checksum
|
|||
pkg/kubelet/checkpointmanager/testing/example_checkpoint_formats/v1
|
||||
pkg/kubelet/client
|
||||
pkg/kubelet/cm
|
||||
pkg/kubelet/cm/devicemanager/checkpoint
|
||||
pkg/kubelet/cm/util
|
||||
pkg/kubelet/config
|
||||
pkg/kubelet/configmap
|
||||
pkg/kubelet/container
|
||||
|
|
|
@ -23,11 +23,13 @@ import (
|
|||
"k8s.io/kubernetes/pkg/kubelet/checkpointmanager/checksum"
|
||||
)
|
||||
|
||||
// DeviceManagerCheckpoint defines the operations to retrieve pod devices
|
||||
type DeviceManagerCheckpoint interface {
|
||||
checkpointmanager.Checkpoint
|
||||
GetData() ([]PodDevicesEntry, map[string][]string)
|
||||
}
|
||||
|
||||
// PodDevicesEntry connects pod information to devices
|
||||
type PodDevicesEntry struct {
|
||||
PodUID string
|
||||
ContainerName string
|
||||
|
@ -44,6 +46,7 @@ type checkpointData struct {
|
|||
RegisteredDevices map[string][]string
|
||||
}
|
||||
|
||||
// Data holds checkpoint data and its checksum
|
||||
type Data struct {
|
||||
Data checkpointData
|
||||
Checksum checksum.Checksum
|
||||
|
@ -76,6 +79,7 @@ func (cp *Data) VerifyChecksum() error {
|
|||
return cp.Checksum.Verify(cp.Data)
|
||||
}
|
||||
|
||||
// GetData returns device entries and registered devices
|
||||
func (cp *Data) GetData() ([]PodDevicesEntry, map[string][]string) {
|
||||
return cp.Data.PodDeviceEntries, cp.Data.RegisteredDevices
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import (
|
|||
libcontainerutils "github.com/opencontainers/runc/libcontainer/utils"
|
||||
)
|
||||
|
||||
// GetPids gets pids of the desired cgroup
|
||||
// Forked from opencontainers/runc/libcontainer/cgroup/fs.Manager.GetPids()
|
||||
func GetPids(cgroupPath string) ([]int, error) {
|
||||
dir, err := getCgroupPath(cgroupPath)
|
||||
|
|
|
@ -18,6 +18,7 @@ limitations under the License.
|
|||
|
||||
package util
|
||||
|
||||
// GetPids gets pids of the desired cgroup
|
||||
func GetPids(cgroupPath string) ([]int, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue