mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
fixing based on feedback in PR
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
d621e09a52
commit
c865ad532a
@ -129,10 +129,6 @@ func (cc *cadvisorClient) Start() error {
|
|||||||
return cc.Manager.Start()
|
return cc.Manager.Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cc *cadvisorClient) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) {
|
|
||||||
return cc.GetContainerInfo(name, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cc *cadvisorClient) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
func (cc *cadvisorClient) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
||||||
return cc.GetContainerInfoV2(name, options)
|
return cc.GetContainerInfoV2(name, options)
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,6 @@ func (cu *cadvisorUnsupported) Start() error {
|
|||||||
return errUnsupported
|
return errUnsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cu *cadvisorUnsupported) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) {
|
|
||||||
return nil, errUnsupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cu *cadvisorUnsupported) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
func (cu *cadvisorUnsupported) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
||||||
return nil, errUnsupported
|
return nil, errUnsupported
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,6 @@ func (cu *cadvisorClient) Start() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cu *cadvisorClient) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) {
|
|
||||||
return &cadvisorapi.ContainerInfo{}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContainerInfoV2 is only expected to be used for the root container. Returns info for all containers in the node.
|
// ContainerInfoV2 is only expected to be used for the root container. Returns info for all containers in the node.
|
||||||
func (cu *cadvisorClient) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
func (cu *cadvisorClient) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
||||||
return cu.winStatsClient.WinContainerInfos()
|
return cu.winStatsClient.WinContainerInfos()
|
||||||
|
@ -46,11 +46,6 @@ func (c *Fake) Start() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainerInfo is a fake implementation of Interface.ContainerInfo.
|
|
||||||
func (c *Fake) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) {
|
|
||||||
return new(cadvisorapi.ContainerInfo), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContainerInfoV2 is a fake implementation of Interface.ContainerInfoV2.
|
// ContainerInfoV2 is a fake implementation of Interface.ContainerInfoV2.
|
||||||
func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
||||||
return map[string]cadvisorapiv2.ContainerInfo{}, nil
|
return map[string]cadvisorapiv2.ContainerInfo{}, nil
|
||||||
|
@ -67,21 +67,6 @@ func (mr *MockInterfaceMockRecorder) ContainerFsInfo() *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerFsInfo", reflect.TypeOf((*MockInterface)(nil).ContainerFsInfo))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerFsInfo", reflect.TypeOf((*MockInterface)(nil).ContainerFsInfo))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainerInfo mocks base method.
|
|
||||||
func (m *MockInterface) ContainerInfo(name string, req *v1.ContainerInfoRequest) (*v1.ContainerInfo, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "ContainerInfo", name, req)
|
|
||||||
ret0, _ := ret[0].(*v1.ContainerInfo)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContainerInfo indicates an expected call of ContainerInfo.
|
|
||||||
func (mr *MockInterfaceMockRecorder) ContainerInfo(name, req interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerInfo", reflect.TypeOf((*MockInterface)(nil).ContainerInfo), name, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContainerInfoV2 mocks base method.
|
// ContainerInfoV2 mocks base method.
|
||||||
func (m *MockInterface) ContainerInfoV2(name string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error) {
|
func (m *MockInterface) ContainerInfoV2(name string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
@ -26,7 +26,6 @@ import (
|
|||||||
// Interface is an abstract interface for testability. It abstracts the interface to cAdvisor.
|
// Interface is an abstract interface for testability. It abstracts the interface to cAdvisor.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
Start() error
|
Start() error
|
||||||
ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
|
|
||||||
ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
|
ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
|
||||||
GetRequestedContainersInfo(containerName string, options cadvisorapiv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error)
|
GetRequestedContainersInfo(containerName string, options cadvisorapiv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error)
|
||||||
SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
|
SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
|
||||||
|
Loading…
Reference in New Issue
Block a user