Skip to content

Commit b069f00

Browse files
committed
drop unused Delete() function
Signed-off-by: Tim Ramlot <[email protected]>
1 parent c080864 commit b069f00

File tree

5 files changed

+0
-24
lines changed

5 files changed

+0
-24
lines changed

pkg/agent/dummy_data_gatherer.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ func (g *dummyDataGatherer) WaitForCacheSync(ctx context.Context) error {
3939
return nil
4040
}
4141

42-
func (g *dummyDataGatherer) Delete() error {
43-
// no async functionality, see Fetch
44-
return nil
45-
}
46-
4742
func (c *dummyDataGatherer) Fetch() (interface{}, int, error) {
4843
var err error
4944
if c.attemptNumber < c.FailedAttempts {

pkg/datagatherer/datagatherer.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ type DataGatherer interface {
2020
Run(ctx context.Context) error
2121
// WaitForCacheSync waits for the data gatherer's informers cache to sync.
2222
WaitForCacheSync(ctx context.Context) error
23-
// Delete, clear the cache of the DataGatherer if one is being used
24-
Delete() error
2523
}

pkg/datagatherer/k8s/discovery.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ func (g *DataGathererDiscovery) WaitForCacheSync(ctx context.Context) error {
5757
return nil
5858
}
5959

60-
func (g *DataGathererDiscovery) Delete() error {
61-
// no async functionality, see Fetch
62-
return nil
63-
}
64-
6560
// Fetch will fetch discovery data from the apiserver, or return an error
6661
func (g *DataGathererDiscovery) Fetch() (interface{}, int, error) {
6762
data, err := g.cl.ServerVersion()

pkg/datagatherer/k8s/dynamic.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,6 @@ func (g *DataGathererDynamic) WaitForCacheSync(ctx context.Context) error {
307307
return nil
308308
}
309309

310-
// Delete will flush the cache being used to stored resources gathered by the
311-
// informer
312-
func (g *DataGathererDynamic) Delete() error {
313-
g.cache.Flush()
314-
return nil
315-
}
316-
317310
// Fetch will fetch the requested data from the apiserver, or return an error
318311
// if fetching the data fails.
319312
func (g *DataGathererDynamic) Fetch() (interface{}, int, error) {

pkg/datagatherer/local/local.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ func (g *DataGatherer) Run(ctx context.Context) error {
4343
return nil
4444
}
4545

46-
func (g *DataGatherer) Delete() error {
47-
// no async functionality, see Fetch
48-
return nil
49-
}
50-
5146
func (g *DataGatherer) WaitForCacheSync(ctx context.Context) error {
5247
// no async functionality, see Fetch
5348
return nil

0 commit comments

Comments
 (0)