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:
Kubernetes Publisher 2018-08-27 16:27:02 -07:00
commit 31ff53b616

View File

@ -18,7 +18,6 @@ package cache
import ( import (
"context" "context"
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/fields"
@ -91,13 +90,6 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string,
return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} 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 // List a set of apiserver resources
func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) { func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) {
if !lw.DisableChunking { if !lw.DisableChunking {