mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
kubelet should take a client interface
This commit is contained in:
2
pkg/client/cache/listwatch.go
vendored
2
pkg/client/cache/listwatch.go
vendored
@@ -37,7 +37,7 @@ type ListWatch struct {
|
||||
WatchFunc WatchFunc
|
||||
}
|
||||
|
||||
// ListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector
|
||||
// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.
|
||||
func NewListWatchFromClient(client *client.Client, resource string, namespace string, fieldSelector labels.Selector) *ListWatch {
|
||||
listFunc := func() (runtime.Object, error) {
|
||||
return client.Get().Namespace(namespace).Resource(resource).SelectorParam("fields", fieldSelector).Do().Get()
|
||||
|
Reference in New Issue
Block a user