Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5dc20421
Commit
5dc20421
authored
Feb 19, 2015
by
Xiang Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg/kubelet: drop the unnecessary method receiver
parent
c6d8bd8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cadvisor.go
pkg/kubelet/cadvisor.go
+4
-4
No files found.
pkg/kubelet/cadvisor.go
View file @
5dc20421
...
...
@@ -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
...
...
@@ -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
...
...
@@ -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
}
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment