mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 06:43:54 +00:00
WatchEvents seems useless
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
aee1d54a0d
commit
642574e964
@ -34,7 +34,6 @@ import (
|
|||||||
|
|
||||||
"github.com/google/cadvisor/cache/memory"
|
"github.com/google/cadvisor/cache/memory"
|
||||||
cadvisormetrics "github.com/google/cadvisor/container"
|
cadvisormetrics "github.com/google/cadvisor/container"
|
||||||
"github.com/google/cadvisor/events"
|
|
||||||
cadvisorapi "github.com/google/cadvisor/info/v1"
|
cadvisorapi "github.com/google/cadvisor/info/v1"
|
||||||
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
||||||
"github.com/google/cadvisor/manager"
|
"github.com/google/cadvisor/manager"
|
||||||
@ -176,7 +175,3 @@ func (cc *cadvisorClient) ContainerFsInfo() (cadvisorapiv2.FsInfo, error) {
|
|||||||
}
|
}
|
||||||
return cc.getFsInfo(label)
|
return cc.getFsInfo(label)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cc *cadvisorClient) WatchEvents(request *events.Request) (*events.EventChannel, error) {
|
|
||||||
return cc.WatchForEvents(request)
|
|
||||||
}
|
|
||||||
|
@ -22,7 +22,6 @@ package cadvisor
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/google/cadvisor/events"
|
|
||||||
cadvisorapi "github.com/google/cadvisor/info/v1"
|
cadvisorapi "github.com/google/cadvisor/info/v1"
|
||||||
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
||||||
)
|
)
|
||||||
@ -71,10 +70,6 @@ func (cu *cadvisorUnsupported) ContainerFsInfo() (cadvisorapiv2.FsInfo, error) {
|
|||||||
return cadvisorapiv2.FsInfo{}, errUnsupported
|
return cadvisorapiv2.FsInfo{}, errUnsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cu *cadvisorUnsupported) WatchEvents(request *events.Request) (*events.EventChannel, error) {
|
|
||||||
return nil, errUnsupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cu *cadvisorUnsupported) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
|
func (cu *cadvisorUnsupported) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
|
||||||
return cadvisorapiv2.FsInfo{}, nil
|
return cadvisorapiv2.FsInfo{}, nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@ limitations under the License.
|
|||||||
package cadvisor
|
package cadvisor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/cadvisor/events"
|
|
||||||
cadvisorapi "github.com/google/cadvisor/info/v1"
|
cadvisorapi "github.com/google/cadvisor/info/v1"
|
||||||
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/winstats"
|
"k8s.io/kubernetes/pkg/kubelet/winstats"
|
||||||
@ -75,10 +74,6 @@ func (cu *cadvisorClient) RootFsInfo() (cadvisorapiv2.FsInfo, error) {
|
|||||||
return cu.GetDirFsInfo(cu.rootPath)
|
return cu.GetDirFsInfo(cu.rootPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cu *cadvisorClient) WatchEvents(request *events.Request) (*events.EventChannel, error) {
|
|
||||||
return &events.EventChannel{}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cu *cadvisorClient) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
|
func (cu *cadvisorClient) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
|
||||||
return cu.winStatsClient.GetDirFsInfo(path)
|
return cu.winStatsClient.GetDirFsInfo(path)
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||||||
package testing
|
package testing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/cadvisor/events"
|
|
||||||
cadvisorapi "github.com/google/cadvisor/info/v1"
|
cadvisorapi "github.com/google/cadvisor/info/v1"
|
||||||
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/cadvisor"
|
"k8s.io/kubernetes/pkg/kubelet/cadvisor"
|
||||||
@ -91,11 +90,6 @@ func (c *Fake) ContainerFsInfo() (cadvisorapiv2.FsInfo, error) {
|
|||||||
return cadvisorapiv2.FsInfo{}, nil
|
return cadvisorapiv2.FsInfo{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// WatchEvents is a fake implementation of Interface.WatchEvents.
|
|
||||||
func (c *Fake) WatchEvents(request *events.Request) (*events.EventChannel, error) {
|
|
||||||
return new(events.EventChannel), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDirFsInfo is a fake implementation of Interface.GetDirFsInfo.
|
// GetDirFsInfo is a fake implementation of Interface.GetDirFsInfo.
|
||||||
func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
|
func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
|
||||||
return cadvisorapiv2.FsInfo{}, nil
|
return cadvisorapiv2.FsInfo{}, nil
|
||||||
|
@ -24,7 +24,6 @@ import (
|
|||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
events "github.com/google/cadvisor/events"
|
|
||||||
v1 "github.com/google/cadvisor/info/v1"
|
v1 "github.com/google/cadvisor/info/v1"
|
||||||
v2 "github.com/google/cadvisor/info/v2"
|
v2 "github.com/google/cadvisor/info/v2"
|
||||||
)
|
)
|
||||||
@ -186,21 +185,6 @@ func (mr *MockInterfaceMockRecorder) VersionInfo() *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VersionInfo", reflect.TypeOf((*MockInterface)(nil).VersionInfo))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VersionInfo", reflect.TypeOf((*MockInterface)(nil).VersionInfo))
|
||||||
}
|
}
|
||||||
|
|
||||||
// WatchEvents mocks base method.
|
|
||||||
func (m *MockInterface) WatchEvents(request *events.Request) (*events.EventChannel, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "WatchEvents", request)
|
|
||||||
ret0, _ := ret[0].(*events.EventChannel)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// WatchEvents indicates an expected call of WatchEvents.
|
|
||||||
func (mr *MockInterfaceMockRecorder) WatchEvents(request interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchEvents", reflect.TypeOf((*MockInterface)(nil).WatchEvents), request)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockImageFsInfoProvider is a mock of ImageFsInfoProvider interface.
|
// MockImageFsInfoProvider is a mock of ImageFsInfoProvider interface.
|
||||||
type MockImageFsInfoProvider struct {
|
type MockImageFsInfoProvider struct {
|
||||||
ctrl *gomock.Controller
|
ctrl *gomock.Controller
|
||||||
|
@ -18,7 +18,6 @@ limitations under the License.
|
|||||||
package cadvisor
|
package cadvisor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/cadvisor/events"
|
|
||||||
cadvisorapi "github.com/google/cadvisor/info/v1"
|
cadvisorapi "github.com/google/cadvisor/info/v1"
|
||||||
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
||||||
)
|
)
|
||||||
@ -42,9 +41,6 @@ type Interface interface {
|
|||||||
// KEP 4191 can separate the image filesystem
|
// KEP 4191 can separate the image filesystem
|
||||||
ContainerFsInfo() (cadvisorapiv2.FsInfo, error)
|
ContainerFsInfo() (cadvisorapiv2.FsInfo, error)
|
||||||
|
|
||||||
// Get events streamed through passedChannel that fit the request.
|
|
||||||
WatchEvents(request *events.Request) (*events.EventChannel, error)
|
|
||||||
|
|
||||||
// Get filesystem information for the filesystem that contains the given file.
|
// Get filesystem information for the filesystem that contains the given file.
|
||||||
GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)
|
GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user