Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 237 for withCancel (0.46 sec)

  1. cmd/service.go

    // GlobalContext context that is canceled when server is requested to shut down.
    // cancelGlobalContext can be used to indicate server shutdown.
    var GlobalContext, cancelGlobalContext = context.WithCancel(context.Background())
    
    // restartProcess starts a new process passing it the active fd's. It
    // doesn't fork, but starts a new process using the same environment and
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Feb 28 07:02:14 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. pilot/pkg/leaderelection/k8sleaderelection/leaderelection.go

    	defer runtime.HandleCrash()
    	defer func() {
    		le.config.Callbacks.OnStoppedLeading()
    	}()
    
    	if !le.acquire(ctx) {
    		return // ctx signaled done
    	}
    	ctx, cancel := context.WithCancel(ctx)
    	defer cancel()
    	go le.config.Callbacks.OnStartedLeading(ctx)
    	le.renew(ctx)
    }
    
    // RunOrDie starts a client with the provided config or panics if the config
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 24 04:04:42 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/controller/controller_test.go

    			},
    		},
    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			ctxServer, closeServer := context.WithCancel(context.Background())
    			ctxTransformers, closeTransformers := context.WithCancel(ctxServer)
    			t.Cleanup(closeServer)
    			t.Cleanup(closeTransformers)
    
    			legacyregistry.Reset()
    
    			// load initial encryption config
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/vcweb/hg.go

    		// if "hg" works at all then "hg serve" works too, and we'll execute that as
    		// a subprocess, using a reverse proxy to forward the request and response.
    
    		ctx, cancel := context.WithCancel(req.Context())
    		defer cancel()
    
    		cmd := exec.CommandContext(ctx, h.hgPath, "serve", "--port", "0", "--address", "localhost", "--accesslog", os.DevNull, "--name", "vcweb", "--print-url")
    		cmd.Dir = dir
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 01 02:52:19 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  5. internal/s3select/progress.go

    				return nil, errInvalidCompression(err, compType)
    			}
    			return nil, errTruncatedInput(err)
    		}
    		r = gzr
    		pr.closer = gzr
    	case bzip2Type:
    		ctx, cancel := context.WithCancel(context.Background())
    		r = pbzip2.NewReader(ctx, scannedReader, pbzip2.DecompressionOptions(
    			pbzip2.BZConcurrency((runtime.GOMAXPROCS(0)+1)/2),
    			pbzip2.BZConcurrencyPool(bz2Limiter),
    		))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Oct 18 15:44:36 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  6. internal/grid/debug.go

    	if err != nil {
    		return nil, err
    	}
    	dialer := &net.Dialer{
    		Timeout: 5 * time.Second,
    	}
    	var res TestGrid
    	res.Hosts = hosts
    	ready := make(chan struct{})
    	ctx, cancel := context.WithCancel(context.Background())
    	res.cancel = cancel
    	for i, host := range hosts {
    		manager, err := NewManager(ctx, ManagerOptions{
    			Dialer: dialer.DialContext,
    			Local:  host,
    			Hosts:  hosts,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  7. pkg/scheduler/schedule_one_test.go

    	client := clientsetfake.NewSimpleClientset(objs...)
    	broadcaster := events.NewBroadcaster(&events.EventSinkImpl{Interface: client.EventsV1()})
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	informerFactory := informers.NewSharedInformerFactory(client, 0)
    	sched, err := New(
    		ctx,
    		client,
    		informerFactory,
    		nil,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
  8. pkg/envoy/agent_test.go

    		a.Run(ctx)
    		done <- struct{}{}
    	}()
    	<-done
    }
    
    // TestStartTwiceStop applies three configs and validates that cleanups are called in order
    func TestStartStop(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	start := func(_ <-chan error) error {
    		return nil
    	}
    	cleanup := func() {
    		cancel()
    	}
    	a := NewAgent(TestProxy{run: start, cleanup: cleanup}, 0, 0, "", 0, 0, 0, true)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Oct 19 20:22:09 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/noderesources/fit_test.go

    			test.nodeInfo.SetNode(&node)
    
    			if test.args.ScoringStrategy == nil {
    				test.args.ScoringStrategy = defaultScoringStrategy
    			}
    
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			p, err := NewFit(ctx, &test.args, nil, plfeature.Features{})
    			if err != nil {
    				t.Fatal(err)
    			}
    			cycleState := framework.NewCycleState()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 57.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unusedresult/unusedresult.go

    	//
    
    	// List standard library functions here.
    	// The context.With{Cancel,Deadline,Timeout} entries are
    	// effectively redundant wrt the lostcancel analyzer.
    	funcs = stringSetFlag{
    		"context.WithCancel":   true,
    		"context.WithDeadline": true,
    		"context.WithTimeout":  true,
    		"context.WithValue":    true,
    		"errors.New":           true,
    		"fmt.Errorf":           true,
    		"fmt.Sprint":           true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top