Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for configIndexSnapshot (0.13 sec)

  1. pilot/pkg/model/typed_xds_cache_test.go

    	// adding the entry populates the indexes
    	c.Add(firstEntry.Key(), firstEntry, req, res)
    
    	assert.Equal(t, cache.store.Len(), 1)
    	assert.Equal(t, cache.indexLength(), 2)
    	assert.Equal(t, cache.configIndexSnapshot(), map[ConfigHash]sets.Set[uint64]{
    		ConfigKey{Kind: kind.Service, Name: "name", Namespace: "namespace"}.HashCode():         sets.New(firstEntry.Key()),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jan 29 20:35:31 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. pilot/pkg/model/typed_xds_cache.go

    		}
    
    		res[i] = v.value
    	}
    	return res
    }
    
    func (l *lruCache[K]) indexLength() int {
    	l.mu.RLock()
    	defer l.mu.RUnlock()
    	return len(l.configIndex)
    }
    
    func (l *lruCache[K]) configIndexSnapshot() map[ConfigHash]sets.Set[K] {
    	l.mu.RLock()
    	defer l.mu.RUnlock()
    	res := make(map[ConfigHash]sets.Set[K], len(l.configIndex))
    	for k, v := range l.configIndex {
    		res[k] = v
    	}
    	return res
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 05:26:03 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top