Skip to content

Commit

Permalink
pkg/kubelet: drop the unnecessary method receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
xiang90 committed Feb 20, 2015
1 parent c6d8bd8 commit 5dc2042
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/kubelet/cadvisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type cadvisorInterface interface {
// container. The container's absolute path refers to its hierarchy in the
// cgroup file system. e.g. The root container, which represents the whole
// machine, has path "/"; all docker containers have path "/docker/<docker id>"
func (kl *Kubelet) statsFromContainerPath(cc cadvisorInterface, containerPath string, req *cadvisor.ContainerInfoRequest) (*cadvisor.ContainerInfo, error) {
func statsFromContainerPath(cc cadvisorInterface, containerPath string, req *cadvisor.ContainerInfoRequest) (*cadvisor.ContainerInfo, error) {
cinfo, err := cc.ContainerInfo(containerPath, req)
if err != nil {
return nil, err
Expand All @@ -57,7 +57,7 @@ func (kl *Kubelet) statsFromContainerPath(cc cadvisorInterface, containerPath st

// statsFromDockerContainer takes a Docker container's ID and returns the stats for the
// container.
func (kl *Kubelet) statsFromDockerContainer(cc cadvisorInterface, containerId string, req *cadvisor.ContainerInfoRequest) (*cadvisor.ContainerInfo, error) {
func statsFromDockerContainer(cc cadvisorInterface, containerId string, req *cadvisor.ContainerInfoRequest) (*cadvisor.ContainerInfo, error) {
cinfo, err := cc.DockerContainer(containerId, req)
if err != nil {
return nil, err
Expand All @@ -83,7 +83,7 @@ func (kl *Kubelet) GetContainerInfo(podFullName string, uid types.UID, container
return nil, ErrContainerNotFound
}

ci, err := kl.statsFromDockerContainer(cc, dockerContainer.ID, req)
ci, err := statsFromDockerContainer(cc, dockerContainer.ID, req)
if err != nil {
return nil, ErrCadvisorApiFailure
}
Expand All @@ -96,7 +96,7 @@ func (kl *Kubelet) GetRootInfo(req *cadvisor.ContainerInfoRequest) (*cadvisor.Co
if cc == nil {
return nil, fmt.Errorf("no cadvisor connection")
}
return kl.statsFromContainerPath(cc, "/", req)
return statsFromContainerPath(cc, "/", req)
}

func (kl *Kubelet) GetMachineInfo() (*cadvisor.MachineInfo, error) {
Expand Down

0 comments on commit 5dc2042

Please sign in to comment.