Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for InsertContains (0.29 sec)

  1. pkg/kube/krt/join.go

    		}
    	}
    	return nil
    }
    
    func (j *join[T]) List() []T {
    	res := []T{}
    	found := sets.New[Key[T]]()
    	for _, c := range j.collections {
    		for _, i := range c.List() {
    			key := GetKey(i)
    			if !found.InsertContains(key) {
    				// Only keep it if it is the first time we saw it, as our merging mechanism is to keep the first one
    				res = append(res, i)
    			}
    		}
    	}
    	return res
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. pkg/test/framework/suitecontext.go

    // debugging
    func (c *suiteContext) allocateContextID(prefix string) string {
    	c.contextMu.Lock()
    	defer c.contextMu.Unlock()
    
    	candidate := prefix
    	discriminator := 0
    	for {
    		if !c.contextNames.InsertContains(candidate) {
    			return candidate
    		}
    
    		candidate = fmt.Sprintf("%s-%d", prefix, discriminator)
    		discriminator++
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. pilot/pkg/trustbundle/trustbundle.go

    	certMap := sets.New[string]()
    
    	tb.mutex.Lock()
    	defer tb.mutex.Unlock()
    
    	for _, configSource := range tb.sourceConfig {
    		for _, cert := range configSource.Certs {
    			if !certMap.InsertContains(cert) {
    				mergeCerts = append(mergeCerts, cert)
    			}
    		}
    	}
    	tb.mergedCerts = mergeCerts
    	sort.Strings(tb.mergedCerts)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  4. pkg/config/security/security.go

    	if len(suites) == 0 {
    		return nil
    	}
    	ret := make([]string, 0, len(suites))
    	validCiphers := sets.New[string]()
    	for _, s := range suites {
    		if IsValidCipherSuite(s) {
    			if !validCiphers.InsertContains(s) {
    				ret = append(ret, s)
    			} else if log.DebugEnabled() {
    				log.Debugf("ignoring duplicated cipherSuite: %q", s)
    			}
    		} else if log.DebugEnabled() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 07 04:43:34 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  5. pilot/pkg/model/gateway.go

    		log.Debugf("MergeGateways: merging gateway %q :\n%v", gatewayName, gatewayCfg)
    		snames := sets.String{}
    		for _, s := range gatewayCfg.Servers {
    			if len(s.Name) > 0 {
    				if snames.InsertContains(s.Name) {
    					log.Warnf("Server name %s is not unique in gateway %s and may create possible issues like stat prefix collision ",
    						s.Name, gatewayName)
    				}
    			}
    			if s.Port == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:37 UTC 2024
    - 26K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex.go

    	got := sets.New[string]()
    	for wname := range addresses {
    		wl := a.Lookup(wname)
    		if len(wl) == 0 {
    			removed = append(removed, wname)
    		} else {
    			for _, addr := range wl {
    				if !got.InsertContains(addr.ResourceName()) {
    					res = append(res, addr)
    				}
    			}
    		}
    	}
    	return res, sets.New(removed...)
    }
    
    func (a *index) ServicesForWaypoint(key model.WaypointKey) []model.ServiceInfo {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 19 17:19:41 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  7. pilot/pkg/serviceregistry/kube/controller/endpointslice.go

    	found := sets.New[endpointKey]()
    	for _, eps := range e.endpointsByServiceAndSlice[hostname] {
    		for _, ep := range eps {
    			key := endpointKey{ep.Address, ep.ServicePortName}
    			if found.InsertContains(key) {
    				// This a duplicate. Update() already handles conflict resolution, so we don't
    				// need to pick the "right" one here.
    				continue
    			}
    			endpoints = append(endpoints, ep)
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  8. pkg/config/validation/validation.go

    				errs = AppendValidation(errs, fmt.Errorf("service entry port may not be null"))
    				continue
    			}
    			if servicePorts.InsertContains(port.Name) {
    				errs = AppendValidation(errs, fmt.Errorf("service entry port name %q already defined", port.Name))
    			}
    			if servicePortNumbers.InsertContains(port.Number) {
    				errs = AppendValidation(errs, fmt.Errorf("service entry port %d already defined", port.Number))
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 04:03:33 UTC 2024
    - 107.2K bytes
    - Viewed (0)
  9. pkg/kube/krt/collection.go

    	register func(f erasedEventHandler),
    ) {
    	i.d = append(i.d, d)
    
    	// For any new collections we depend on, start watching them if its the first time we have watched them.
    	if !i.collectionDependencies.InsertContains(d.id) {
    		i.log.WithLabels("collection", d.collectionName).Debugf("register new dependency")
    		syncer.WaitUntilSynced(i.stop)
    		register(func(o []Event[any], initialSync bool) {
    			i.onSecondaryDependencyEvent(d.id, o)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  10. pkg/bootstrap/config.go

    	}
    	return res, nil
    }
    
    func removeDuplicates(values []string) []string {
    	set := sets.New[string]()
    	newValues := make([]string, 0, len(values))
    	for _, v := range values {
    		if !set.InsertContains(v) {
    			newValues = append(newValues, v)
    		}
    	}
    	return newValues
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:02:38 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top