Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for NewEndpointIndex (0.2 sec)

  1. pilot/pkg/serviceregistry/kube/controller/fake.go

    func NewFakeControllerWithOptions(t test.Failer, opts FakeControllerOptions) (*FakeController, *xdsfake.Updater) {
    	xdsUpdater := opts.XDSUpdater
    	var endpoints *model.EndpointIndex
    	if xdsUpdater == nil {
    		endpoints = model.NewEndpointIndex(model.DisabledCache{})
    		delegate := model.NewEndpointIndexUpdater(endpoints)
    		xdsUpdater = xdsfake.NewWithDelegate(delegate)
    	}
    
    	domainSuffix := defaultFakeDomainSuffix
    	if opts.DomainSuffix != "" {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. tests/fuzz/pilot_model_fuzzer.go

    	sd.WantGetProxyServiceTargets = slices.Map(serviceInstances, model.ServiceInstanceToTarget)
    	env.ServiceDiscovery = sd
    
    	env.Watcher = mesh.NewFixedWatcher(m)
    	env.EndpointIndex = model.NewEndpointIndex(model.DisabledCache{})
    	env.Init()
    	pc := model.NewPushContext()
    	_ = pc.InitContext(env, nil, nil)
    	return 1
    }
    
    func FuzzBNMUnmarshalJSON(data []byte) int {
    	var bnm model.BootstrapNodeMetadata
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 18:13:06 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  3. pilot/pkg/model/endpointshards.go

    	mu sync.RWMutex
    	// keyed by svc then ns
    	shardsBySvc map[string]map[string]*EndpointShards
    	// We'll need to clear the cache in-sync with endpoint shards modifications.
    	cache XdsCache
    }
    
    func NewEndpointIndex(cache XdsCache) *EndpointIndex {
    	return &EndpointIndex{
    		shardsBySvc: make(map[string]map[string]*EndpointShards),
    		cache:       cache,
    	}
    }
    
    // must be called with lock
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:37 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  4. pilot/pkg/xds/endpoints/ep_filters_test.go

    				ep.Labels = make(map[string]string)
    			}
    			ep.Labels["app"] = "example"
    			ep.Locality.ClusterID = sk.Cluster
    			shards.Shards[sk][i] = ep
    		}
    	}
    	// convert to EndpointIndex
    	index := model.NewEndpointIndex(model.NewXdsCache())
    	for shardKey, testEps := range shards.Shards {
    		svc, _ := index.GetOrCreateEndpointShard("example.ns.svc.cluster.local", "ns")
    		svc.Lock()
    		svc.Shards[shardKey] = testEps
    		svc.Unlock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 01:17:58 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  5. pilot/pkg/model/context.go

    	if features.EnableXDSCaching {
    		cache = NewXdsCache()
    	} else {
    		cache = DisabledCache{}
    	}
    	return &Environment{
    		pushContext:   NewPushContext(),
    		Cache:         cache,
    		EndpointIndex: NewEndpointIndex(cache),
    	}
    }
    
    // Environment provides an aggregate environmental API for Pilot
    type Environment struct {
    	// Discovery interface for listing services and instances.
    	ServiceDiscovery
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 03 08:29:05 UTC 2024
    - 33.6K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/serviceregistry_test.go

    	"istio.io/istio/pkg/test/util/retry"
    )
    
    func setupTest(t *testing.T) (model.ConfigStoreController, kubernetes.Interface, *xdsfake.Updater) {
    	t.Helper()
    	client := kubeclient.NewFakeClient()
    
    	endpoints := model.NewEndpointIndex(model.DisabledCache{})
    	delegate := model.NewEndpointIndexUpdater(endpoints)
    	xdsUpdater := xdsfake.NewWithDelegate(delegate)
    	delegate.ConfigUpdateFunc = xdsUpdater.ConfigUpdate
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 51.2K bytes
    - Viewed (0)
  7. pilot/pkg/model/push_context_test.go

    				}
    			})
    			assert.Equal(t, tt.output, out)
    		})
    	}
    }
    
    func BenchmarkInitServiceAccounts(b *testing.B) {
    	ps := NewPushContext()
    	index := NewEndpointIndex(DisabledCache{})
    	env := &Environment{EndpointIndex: index}
    	ps.Mesh = &meshconfig.MeshConfig{TrustDomainAliases: []string{"td1", "td2"}}
    
    	services := []*Service{
    		{
    			Hostname: "svc-unset",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 95.3K bytes
    - Viewed (0)
  8. pilot/pkg/serviceregistry/serviceentry/controller_test.go

    	store := memory.Make(collections.Pilot)
    	configController := memory.NewSyncController(store)
    
    	stop := test.NewStop(t)
    	go configController.Run(stop)
    
    	endpoints := model.NewEndpointIndex(model.DisabledCache{})
    	delegate := model.NewEndpointIndexUpdater(endpoints)
    	xdsUpdater := xdsfake.NewWithDelegate(delegate)
    
    	meshcfg := mesh.NewFixedWatcher(mesh.DefaultMeshConfig())
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 92.9K bytes
    - Viewed (0)
Back to top