remove unused interface method
This commit is contained in:
parent
e310755a36
commit
e4d403193f
@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/google/cadvisor/container"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/info/v2"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"k8s.io/klog"
|
||||
@ -36,8 +35,6 @@ type infoProvider interface {
|
||||
GetVersionInfo() (*info.VersionInfo, error)
|
||||
// GetMachineInfo provides information about the machine.
|
||||
GetMachineInfo() (*info.MachineInfo, error)
|
||||
// GetProcessList provides information about each container's processes
|
||||
GetProcessList(containerName string, options v2.RequestOptions) ([]v2.ProcessInfo, error)
|
||||
}
|
||||
|
||||
// metricValue describes a single metric value for a given set of label values
|
||||
|
@ -26,7 +26,6 @@ import (
|
||||
|
||||
"github.com/google/cadvisor/container"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/info/v2"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
@ -50,26 +49,6 @@ func (p testSubcontainersInfoProvider) GetMachineInfo() (*info.MachineInfo, erro
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (p testSubcontainersInfoProvider) GetProcessList(containerName string, options v2.RequestOptions) ([]v2.ProcessInfo, error) {
|
||||
return []v2.ProcessInfo{
|
||||
{
|
||||
User: "user1",
|
||||
Pid: 1,
|
||||
Ppid: 2,
|
||||
StartTime: "OCT2018",
|
||||
PercentCpu: 0.0,
|
||||
PercentMemory: 0.0,
|
||||
RSS: 3,
|
||||
VirtualSize: 4,
|
||||
Status: "S",
|
||||
RunningTime: "00:00:00",
|
||||
Cmd: "cmd1",
|
||||
CgroupPath: "path",
|
||||
FdCount: 5,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
var allMetrics = container.MetricSet{
|
||||
container.CpuUsageMetrics: struct{}{},
|
||||
container.ProcessSchedulerMetrics: struct{}{},
|
||||
@ -331,13 +310,6 @@ func (p *erroringSubcontainersInfoProvider) GetMachineInfo() (*info.MachineInfo,
|
||||
return p.successfulProvider.GetMachineInfo()
|
||||
}
|
||||
|
||||
func (p *erroringSubcontainersInfoProvider) GetProcessList(containerName string, options v2.RequestOptions) ([]v2.ProcessInfo, error) {
|
||||
if p.shouldFail {
|
||||
return nil, errors.New("Oops 2")
|
||||
}
|
||||
return p.successfulProvider.GetProcessList(containerName, options)
|
||||
}
|
||||
|
||||
func (p *erroringSubcontainersInfoProvider) SubcontainersInfo(
|
||||
a string, r *info.ContainerInfoRequest) ([]*info.ContainerInfo, error) {
|
||||
if p.shouldFail {
|
||||
|
Loading…
Reference in New Issue
Block a user