diff --git a/pkg/agent/dummy_data_gatherer.go b/pkg/agent/dummy_data_gatherer.go index 970a69e0..48eda8c9 100644 --- a/pkg/agent/dummy_data_gatherer.go +++ b/pkg/agent/dummy_data_gatherer.go @@ -39,11 +39,6 @@ func (g *dummyDataGatherer) WaitForCacheSync(ctx context.Context) error { return nil } -func (g *dummyDataGatherer) Delete() error { - // no async functionality, see Fetch - return nil -} - func (c *dummyDataGatherer) Fetch() (interface{}, int, error) { var err error if c.attemptNumber < c.FailedAttempts { diff --git a/pkg/datagatherer/datagatherer.go b/pkg/datagatherer/datagatherer.go index 1a92c366..3a4cfe04 100644 --- a/pkg/datagatherer/datagatherer.go +++ b/pkg/datagatherer/datagatherer.go @@ -20,6 +20,4 @@ type DataGatherer interface { Run(ctx context.Context) error // WaitForCacheSync waits for the data gatherer's informers cache to sync. WaitForCacheSync(ctx context.Context) error - // Delete, clear the cache of the DataGatherer if one is being used - Delete() error } diff --git a/pkg/datagatherer/k8s/discovery.go b/pkg/datagatherer/k8s/discovery.go index f072dcaf..586622d6 100644 --- a/pkg/datagatherer/k8s/discovery.go +++ b/pkg/datagatherer/k8s/discovery.go @@ -57,11 +57,6 @@ func (g *DataGathererDiscovery) WaitForCacheSync(ctx context.Context) error { return nil } -func (g *DataGathererDiscovery) Delete() error { - // no async functionality, see Fetch - return nil -} - // Fetch will fetch discovery data from the apiserver, or return an error func (g *DataGathererDiscovery) Fetch() (interface{}, int, error) { data, err := g.cl.ServerVersion() diff --git a/pkg/datagatherer/k8s/dynamic.go b/pkg/datagatherer/k8s/dynamic.go index 49b96278..cca6e5cb 100644 --- a/pkg/datagatherer/k8s/dynamic.go +++ b/pkg/datagatherer/k8s/dynamic.go @@ -307,13 +307,6 @@ func (g *DataGathererDynamic) WaitForCacheSync(ctx context.Context) error { return nil } -// Delete will flush the cache being used to stored resources gathered by the -// informer -func (g *DataGathererDynamic) Delete() error { - g.cache.Flush() - return nil -} - // Fetch will fetch the requested data from the apiserver, or return an error // if fetching the data fails. func (g *DataGathererDynamic) Fetch() (interface{}, int, error) { diff --git a/pkg/datagatherer/local/local.go b/pkg/datagatherer/local/local.go index a74dc6af..27368973 100644 --- a/pkg/datagatherer/local/local.go +++ b/pkg/datagatherer/local/local.go @@ -43,11 +43,6 @@ func (g *DataGatherer) Run(ctx context.Context) error { return nil } -func (g *DataGatherer) Delete() error { - // no async functionality, see Fetch - return nil -} - func (g *DataGatherer) WaitForCacheSync(ctx context.Context) error { // no async functionality, see Fetch return nil