mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-06 17:40:57 +00:00
refactor
Kubernetes-commit: d55d6175f8e2cfdab0b79aac72046a652c2eb515
This commit is contained in:
committed by
Kubernetes Publisher
parent
1b1a1841fa
commit
b136e9eb2b
6
tools/cache/listwatch.go
vendored
6
tools/cache/listwatch.go
vendored
@@ -17,6 +17,8 @@ limitations under the License.
|
||||
package cache
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -82,7 +84,7 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string,
|
||||
Namespace(namespace).
|
||||
Resource(resource).
|
||||
VersionedParams(&options, metav1.ParameterCodec).
|
||||
Do().
|
||||
Do(context.TODO()).
|
||||
Get()
|
||||
}
|
||||
watchFunc := func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
@@ -92,7 +94,7 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string,
|
||||
Namespace(namespace).
|
||||
Resource(resource).
|
||||
VersionedParams(&options, metav1.ParameterCodec).
|
||||
Watch()
|
||||
Watch(context.TODO())
|
||||
}
|
||||
return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}
|
||||
}
|
||||
|
Reference in New Issue
Block a user