Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IsStaleInformerCacheErr (0.29 sec)

  1. pkg/controller/util/endpointslice/errors.go

    func NewStaleInformerCache(msg string) *StaleInformerCache {
    	return &StaleInformerCache{msg}
    }
    
    func (e *StaleInformerCache) Error() string { return e.msg }
    
    func IsStaleInformerCacheErr(err error) bool {
    	_, ok := err.(*StaleInformerCache)
    	return ok
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 14 07:15:35 UTC 2021
    - 1K bytes
    - Viewed (0)
  2. pkg/controller/endpointslice/endpointslice_controller.go

    	}
    }
    
    // trackSync increments the EndpointSliceSyncs metric with the result of a sync.
    func trackSync(err error) {
    	metricLabel := "success"
    	if err != nil {
    		if endpointslicepkg.IsStaleInformerCacheErr(err) {
    			metricLabel = "stale"
    		} else {
    			metricLabel = "error"
    		}
    	}
    	endpointslicemetrics.EndpointSliceSyncs.WithLabelValues(metricLabel).Inc()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 08:33:32 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  3. pkg/controller/endpointslice/endpointslice_controller_test.go

    			logger, _ := ktesting.NewTestContext(t)
    			err = esController.syncService(logger, fmt.Sprintf("%s/%s", ns, serviceName))
    			// Check if we got a StaleInformerCache error
    			if endpointslicepkg.IsStaleInformerCacheErr(err) != testcase.expectError {
    				t.Fatalf("Expected error because informer cache is outdated")
    			}
    
    		})
    	}
    }
    
    func Test_checkNodeTopologyDistribution(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 08:33:32 UTC 2024
    - 65.5K bytes
    - Viewed (0)
Back to top