Skip to content

Commit

Permalink
Merge pull request kubernetes#73234 from baltendo/master
Browse files Browse the repository at this point in the history
Fix golint failures
  • Loading branch information
k8s-ci-robot authored Jan 29, 2019
2 parents 6ebe874 + 736f35e commit b2d2432
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
}
1 change: 1 addition & 0 deletions pkg/kubelet/cm/util/cgroups_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions pkg/kubelet/cm/util/cgroups_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b2d2432

Please sign in to comment.