mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-26 15:12:06 +00:00
Merge pull request #66717 from bboreham/remove-timeoutFromListOptions
Automatic merge from submit-queue (batch tested with PRs 67323, 66717, 67038). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove unused function timeoutFromListOptions() **What this PR does / why we need it**: It removes a function which is not exported and not called or referenced. Re-opening #60215 after rebase. **Which issue(s) this PR fixes** No issue. **Special notes for your reviewer**: I guess it would be useful to know what this was supposed to be doing. I just happened upon it when trying to understand how watch timeouts were configured. **Release note**: ```release-note NONE ``` Kubernetes-commit: 1bfbf861e92410dbed2cb8debdc2f841d0fd7719
This commit is contained in:
commit
31ff53b616
8
tools/cache/listwatch.go
vendored
8
tools/cache/listwatch.go
vendored
@ -18,7 +18,6 @@ package cache
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
@ -91,13 +90,6 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string,
|
||||
return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}
|
||||
}
|
||||
|
||||
func timeoutFromListOptions(options metav1.ListOptions) time.Duration {
|
||||
if options.TimeoutSeconds != nil {
|
||||
return time.Duration(*options.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// List a set of apiserver resources
|
||||
func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if !lw.DisableChunking {
|
||||
|
Loading…
Reference in New Issue
Block a user