Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewDelayed (0.13 sec)

  1. pkg/queue/delay_test.go

    			t.Fatalf("pop %d was not in order", i)
    		}
    		if peeked != popped {
    			t.Fatalf("did not peek at the next item to be popped")
    		}
    	}
    }
    
    func TestDelayQueueOrdering(t *testing.T) {
    	dq := NewDelayed(DelayQueueWorkers(2))
    	stop := make(chan struct{})
    	defer close(stop)
    	go dq.Run(stop)
    
    	mu := sync.Mutex{}
    	var t0, t1, t2 time.Time
    
    	done := make(chan struct{})
    	dq.PushDelayed(func() error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 06:27:31 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. pkg/queue/delay.go

    	//
    	// GOMAXPROCS determines how many goroutines can run in parallel,
    	// which makes it the best choice as the channel capacity,
    	return n
    }()
    
    // NewDelayed gives a Delayed queue with maximum concurrency specified by workers.
    func NewDelayed(opts ...DelayQueueOption) Delayed {
    	q := &delayQueue{
    		workers: 1,
    		queue:   &pq{},
    		execute: make(chan *delayTask, workerChanBuf),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 06:27:31 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  3. pilot/pkg/autoregistration/controller.go

    		}
    	}
    	c := &Controller{
    		instanceID:       instanceID,
    		store:            store,
    		cleanupLimit:     rate.NewLimiter(rate.Limit(20), 1),
    		cleanupQueue:     queue.NewDelayed(),
    		adsConnections:   newAdsConnections(),
    		maxConnectionAge: maxConnAge,
    	}
    	c.queue = controllers.NewQueue("unregister_workloadentry",
    		controllers.WithMaxAttempts(maxRetries),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 00:00:36 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  4. security/pkg/nodeagent/cache/secretcache.go

    	watcher, err := fsnotify.NewWatcher()
    	if err != nil {
    		return nil, err
    	}
    
    	ret := &SecretManagerClient{
    		queue:         queue.NewDelayed(queue.DelayQueueBuffer(0)),
    		caClient:      caClient,
    		configOptions: options,
    		existingCertificateFile: security.SdsCertificateConfig{
    			CertificatePath:   options.CertChainFilePath,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 04 08:29:46 UTC 2024
    - 28.2K bytes
    - Viewed (0)
Back to top