Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for dependentConfigs (0.17 sec)

  1. pilot/pkg/model/typed_xds_cache.go

    			return
    		}
    		if l.enableAssertions {
    			l.assertUnchanged(k, cur.value, value)
    		}
    	}
    
    	dependentConfigs := entry.DependentConfigs()
    	toWrite := cacheValue{value: value, token: token, dependentConfigs: dependentConfigs}
    	l.store.Add(k, toWrite)
    	l.token = token
    	l.updateConfigIndex(k, dependentConfigs)
    
    	// we have to make sure we evict old entries with the same key
    	// to prevent leaking in the index maps
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 05:26:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. pilot/pkg/model/typed_xds_cache_test.go

    )
    
    type entry struct {
    	key              string
    	dependentTypes   []kind.Kind
    	dependentConfigs []ConfigHash
    }
    
    func (e entry) Key() uint64 {
    	h := hash.New()
    	h.WriteString(e.key)
    	return h.Sum64()
    }
    
    func (e entry) DependentConfigs() []ConfigHash {
    	return e.dependentConfigs
    }
    
    func TestAddTwoEntries(t *testing.T) {
    	test.SetForTest(t, &features.XDSCacheMaxSize, 2)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jan 29 20:35:31 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  3. pilot/pkg/networking/core/cluster_cache.go

    		h.WriteString(sa)
    		h.Write(Separator)
    	}
    	h.Write(Separator)
    
    	if t.endpointBuilder != nil {
    		t.endpointBuilder.WriteHash(h)
    	}
    
    	return h.Sum64()
    }
    
    func (t *clusterCache) DependentConfigs() []model.ConfigHash {
    	drs := t.destinationRule.GetFrom()
    	configs := make([]model.ConfigHash, 0, len(drs)+1+len(t.envoyFilterKeys))
    	if t.destinationRule != nil {
    		for _, dr := range drs {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 19:09:43 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. pilot/pkg/networking/core/route/route_cache_test.go

    					Namespace: "default",
    				}.HashCode(),
    			},
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := tt.r.DependentConfigs(); !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("DependentConfigs got %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    func TestExtractNamespaceForKubernetesService(t *testing.T) {
    	tests := []struct {
    		hostname string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. pilot/pkg/model/xds_cache.go

    	// Type indicates the type of Xds resource being cached like CDS.
    	Type() string
    	// Key is the key to be used in cache.
    	Key() any
    	// DependentConfigs is config items that this cache key is dependent on.
    	// Whenever these configs change, we should invalidate this cache entry.
    	DependentConfigs() []ConfigHash
    	// Cacheable indicates whether this entry is valid for cache. For example
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 02 07:02:05 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  6. pilot/pkg/networking/core/route/route_cache.go

    	}
    	ns := hostname[nsI+1 : ih]
    	if len(ns) == 0 {
    		return "", fmt.Errorf("namespace not found")
    	}
    	return ns, nil
    }
    
    func (r *Cache) DependentConfigs() []model.ConfigHash {
    	size := len(r.Services) + len(r.VirtualServices) + len(r.DelegateVirtualServices) + len(r.EnvoyFilterKeys)
    	for _, mergedDR := range r.DestinationRules {
    		size += len(mergedDR.GetFrom())
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. pilot/pkg/xds/endpoints/endpoint_builder.go

    	// invalidate the results.
    	// Service being nil means the EDS will be empty anyways, so not much lost here.
    	return b.service != nil
    }
    
    func (b *EndpointBuilder) DependentConfigs() []model.ConfigHash {
    	drs := b.destinationRule.GetFrom()
    	configs := make([]model.ConfigHash, 0, len(drs)+1)
    	if b.destinationRule != nil {
    		for _, dr := range drs {
    			configs = append(configs, model.ConfigKey{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 02:18:19 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  8. pilot/pkg/xds/sds.go

    func (sr SecretResource) Type() string {
    	return model.SDSType
    }
    
    func (sr SecretResource) Key() any {
    	return sr.SecretResource.Key() + "/" + sr.pkpConfHash
    }
    
    func (sr SecretResource) DependentConfigs() []model.ConfigHash {
    	configs := []model.ConfigHash{}
    	for _, config := range relatedConfigs(model.ConfigKey{Kind: kind.Secret, Name: sr.Name, Namespace: sr.Namespace}) {
    		configs = append(configs, config.HashCode())
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 15 23:04:36 UTC 2024
    - 15.8K bytes
    - Viewed (0)
Back to top