mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Use unversioned.ListOptions in clients.
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/meta"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/client/cache"
|
||||
"k8s.io/kubernetes/pkg/conversion"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
@@ -395,7 +396,7 @@ func (lw *cacherListerWatcher) List() (runtime.Object, error) {
|
||||
}
|
||||
|
||||
// Implements cache.ListerWatcher interface.
|
||||
func (lw *cacherListerWatcher) Watch(options api.ListOptions) (watch.Interface, error) {
|
||||
func (lw *cacherListerWatcher) Watch(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
version, err := ParseWatchResourceVersion(options.ResourceVersion, lw.resourcePrefix)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -250,11 +250,11 @@ func TestWaitUntilFreshAndList(t *testing.T) {
|
||||
|
||||
type testLW struct {
|
||||
ListFunc func() (runtime.Object, error)
|
||||
WatchFunc func(options api.ListOptions) (watch.Interface, error)
|
||||
WatchFunc func(options unversioned.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
func (t *testLW) List() (runtime.Object, error) { return t.ListFunc() }
|
||||
func (t *testLW) Watch(options api.ListOptions) (watch.Interface, error) {
|
||||
func (t *testLW) Watch(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
return t.WatchFunc(options)
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ func TestReflectorForWatchCache(t *testing.T) {
|
||||
}
|
||||
|
||||
lw := &testLW{
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
fw := watch.NewFake()
|
||||
go fw.Stop()
|
||||
return fw, nil
|
||||
|
||||
Reference in New Issue
Block a user