Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for debounceC (0.19 sec)

  1. pilot/pkg/config/monitor/monitor.go

    		return err
    	}
    	watcher := recursiveWatcher{fs}
    	if err = watcher.watchRecursive(path); err != nil {
    		return err
    	}
    	go func() {
    		defer watcher.Close()
    		var debounceC <-chan time.Time
    		for {
    			select {
    			case <-debounceC:
    				debounceC = nil
    				ch <- struct{}{}
    			case e := <-watcher.Events:
    				s, err := os.Stat(e.Name)
    				if err == nil && s != nil && s.IsDir() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 12 17:36:33 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. pkg/util/concurrent/debouncer.go

    // limitations under the License.
    
    package concurrent
    
    import (
    	"time"
    
    	"istio.io/istio/pkg/util/sets"
    )
    
    type Debouncer[T comparable] struct{}
    
    func (d *Debouncer[T]) Run(ch chan T, stopCh <-chan struct{}, debounceMinInterval, debounceMaxInterval time.Duration, pushFn func(sets.Set[T])) {
    	var timeChan <-chan time.Time
    	var startDebounce time.Time
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 01 13:44:06 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. pilot/pkg/xds/discovery.go

    func (s *DiscoveryServer) handleUpdates(stopCh <-chan struct{}) {
    	debounce(s.pushChannel, stopCh, s.DebounceOptions, s.Push, s.CommittedUpdates)
    }
    
    // The debounce helper function is implemented to enable mocking
    func debounce(ch chan *model.PushRequest, stopCh <-chan struct{}, opts DebounceOptions, pushFn func(req *model.PushRequest), updateSent *atomic.Int64) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 20:21:09 UTC 2024
    - 19K bytes
    - Viewed (0)
  4. pilot/pkg/xds/discovery_test.go

    		enableEDSDebounce: false,
    	}
    
    	tests := []struct {
    		name string
    		test func(updateCh chan *model.PushRequest, expect func(partial, full int32))
    	}{
    		{
    			name: "Should not debounce partial pushes",
    			test: func(updateCh chan *model.PushRequest, expect func(partial, full int32)) {
    				updateCh <- &model.PushRequest{Full: false}
    				expect(1, 0)
    				updateCh <- &model.PushRequest{Full: false}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 00:26:45 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  5. pilot/pkg/xds/delta_test.go

    	addTestClientEndpoints(s.MemRegistry)
    	s.MemRegistry.AddHTTPService(edsIncSvc, edsIncVip, 8080)
    	s.MemRegistry.SetEndpoints(edsIncSvc, "",
    		newEndpointWithAccount("127.0.0.1", "hello-sa", "v1"))
    	// Wait until the above debounce, to ensure we can precisely check XDS responses without spurious pushes
    	s.EnsureSynced(t)
    
    	ads := s.ConnectDeltaADS().WithID("sidecar~127.0.0.1~test.default~default.svc.cluster.local")
    
    	// Initially we get everything
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 15.2K bytes
    - Viewed (0)
  6. pkg/config/analysis/incluster/controller.go

    		}
    		return status
    	})
    	return &Controller{analyzer: ia, statusctl: ctl}, nil
    }
    
    // Run is blocking
    func (c *Controller) Run(stop <-chan struct{}) {
    	db := concurrent.Debouncer[config.GroupVersionKind]{}
    	chKind := make(chan config.GroupVersionKind, 10)
    
    	for _, k := range c.analyzer.Schemas().All() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 17:36:47 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. pkg/config/mesh/watcher.go

    	_ = fileWatcher.Add(file)
    	go func() {
    		var timerC <-chan time.Time
    		for {
    			select {
    			case <-timerC:
    				timerC = nil
    				callback()
    			case <-fileWatcher.Events(file):
    				// Use a timer to debounce configuration updates
    				if timerC == nil {
    					timerC = time.After(100 * time.Millisecond)
    				}
    			}
    		}
    	}()
    }
    
    func PrettyFormatOfMeshConfig(meshConfig *meshconfig.MeshConfig) string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Dec 20 18:33:38 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  8. pkg/kube/inject/watcher.go

    					log.Errorf("update error: %v", err)
    				}
    			}
    		case event, ok := <-w.watcher.Events:
    			if !ok {
    				return
    			}
    			log.Debugf("Injector watch update: %+v", event)
    			// use a timer to debounce configuration updates
    			if (event.Has(fsnotify.Write) || event.Has(fsnotify.Create)) && timerC == nil {
    				timerC = time.After(watchDebounceDelay)
    			}
    		case err, ok := <-w.watcher.Errors:
    			if !ok {
    				return
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  9. architecture/networking/pilot.md

    Various components described in Config Ingestion can trigger a Config Update. These are batched up ("debounced"), to avoid excessive activity when many changes happen in succession, and eventually enqueued in the Push Queue.
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 07 17:53:24 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  10. pilot/test/xds/fake.go

    	// ListenerBuilder, if specified, allows making the server use the given
    	// listener instead of a buffered conn.
    	ListenerBuilder func() (net.Listener, error)
    
    	// Time to debounce
    	// By default, set to 0s to speed up tests
    	DebounceTime time.Duration
    
    	// EnableFakeXDSUpdater will use a XDSUpdater that can be used to watch events
    	EnableFakeXDSUpdater       bool
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 10 16:08:52 UTC 2024
    - 18.4K bytes
    - Viewed (0)
Back to top