Skip to content

Commit 19e5c85

Browse files
committed
Cleanup staticcheck from staging/src/k8s.io/client-go/tools/cache.
1 parent 83192d7 commit 19e5c85

File tree

4 files changed

+0
-26
lines changed

4 files changed

+0
-26
lines changed

hack/.staticcheck_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ vendor/k8s.io/client-go/metadata/fake
213213
vendor/k8s.io/client-go/rest
214214
vendor/k8s.io/client-go/rest/watch
215215
vendor/k8s.io/client-go/restmapper
216-
vendor/k8s.io/client-go/tools/cache
217216
vendor/k8s.io/client-go/tools/leaderelection
218217
vendor/k8s.io/client-go/transport
219218
vendor/k8s.io/cloud-provider/service/helpers

staging/src/k8s.io/client-go/tools/cache/delta_fifo.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -539,13 +539,6 @@ func (f *DeltaFIFO) Resync() error {
539539
return nil
540540
}
541541

542-
func (f *DeltaFIFO) syncKey(key string) error {
543-
f.lock.Lock()
544-
defer f.lock.Unlock()
545-
546-
return f.syncKeyLocked(key)
547-
}
548-
549542
func (f *DeltaFIFO) syncKeyLocked(key string) error {
550543
obj, exists, err := f.knownObjects.GetByKey(key)
551544
if err != nil {

staging/src/k8s.io/client-go/tools/cache/reflector.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ import (
4545
type Reflector struct {
4646
// name identifies this reflector. By default it will be a file:line if possible.
4747
name string
48-
// metrics tracks basic metric information about the reflector
49-
metrics *reflectorMetrics
5048

5149
// The type of object we expect to place in the store.
5250
expectedType reflect.Type
@@ -129,9 +127,6 @@ var (
129127
// nothing will ever be sent down this channel
130128
neverExitWatch <-chan time.Time = make(chan time.Time)
131129

132-
// Used to indicate that watching stopped so that a resync could happen.
133-
errorResyncRequested = errors.New("resync channel fired")
134-
135130
// Used to indicate that watching stopped because of a signal from the stop
136131
// channel passed in from a client of the reflector.
137132
errorStopRequested = errors.New("Stop requested")

staging/src/k8s.io/client-go/tools/cache/reflector_metrics.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ func (noopMetric) Dec() {}
4747
func (noopMetric) Observe(float64) {}
4848
func (noopMetric) Set(float64) {}
4949

50-
type reflectorMetrics struct {
51-
numberOfLists CounterMetric
52-
listDuration SummaryMetric
53-
numberOfItemsInList SummaryMetric
54-
55-
numberOfWatches CounterMetric
56-
numberOfShortWatches CounterMetric
57-
watchDuration SummaryMetric
58-
numberOfItemsInWatch SummaryMetric
59-
60-
lastResourceVersion GaugeMetric
61-
}
62-
6350
// MetricsProvider generates various metrics used by the reflector.
6451
type MetricsProvider interface {
6552
NewListsMetric(name string) CounterMetric

0 commit comments

Comments
 (0)