- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewEndpointPortCache (0.57 sec)
-
pkg/controller/endpointslicemirroring/metrics/cache_test.go
pmKey80 := endpointsliceutil.NewPortMapKey([]discovery.EndpointPort{{Port: &p80}}) spCacheEfficient := NewEndpointPortCache() spCacheEfficient.Set(pmKey80, EfficiencyInfo{Endpoints: 45, Slices: 1}) spCacheEfficient.Set(pmKey80443, EfficiencyInfo{Endpoints: 35, Slices: 1}) spCacheInefficient := NewEndpointPortCache() spCacheInefficient.Set(pmKey80, EfficiencyInfo{Endpoints: 12, Slices: 5})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 18:08:12 UTC 2023 - 2.6K bytes - Viewed (0) -
pkg/controller/endpointslicemirroring/metrics/cache.go
// total numbers of desired endpoints and the efficiency of EndpointSlice // endpoints distribution. type EfficiencyInfo struct { Endpoints int Slices int } // NewEndpointPortCache initializes and returns a new EndpointPortCache. func NewEndpointPortCache() *EndpointPortCache { return &EndpointPortCache{ items: map[endpointsliceutil.PortMapKey]EfficiencyInfo{}, } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 18:08:12 UTC 2023 - 5.2K bytes - Viewed (0) -
pkg/controller/endpointslicemirroring/reconciler.go
} // Build data structures for existing state. existingSlicesByKey := endpointSlicesByKey(existingSlices) // Determine changes necessary for each group of slices by port map. epMetrics := metrics.NewEndpointPortCache() totals := totalsByAction{} slices := slicesByAction{} for portKey, desiredEndpoints := range d.endpointsByKey { numEndpoints := len(desiredEndpoints) pmSlices, pmTotals := r.reconcileByPortMapping(
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 18:08:12 UTC 2023 - 13.1K bytes - Viewed (0)