Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 106 for HandleCrash (0.43 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream_test.go

    			[]byte("some random"),
    			[]byte(" text"),
    		},
    		panicMessage: "bad read",
    	}
    	r := NewReader(errs, false, NewDefaultReaderProtocols())
    
    	// do not call runtime.HandleCrash() in handler. Otherwise, the tests are interrupted.
    	r.handleCrash = func(additionalHandlers ...func(interface{})) { recover() }
    
    	data, err := readWebSocket(r, t, nil)
    	if !reflect.DeepEqual(data, []byte(input)) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 15:48:39 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/hooks.go

    }
    
    func runPostStartHook(name string, entry postStartHookEntry, context PostStartHookContext) {
    	var err error
    	func() {
    		// don't let the hook *accidentally* panic and kill the server
    		defer utilruntime.HandleCrash()
    		err = entry.hook(context)
    	}()
    	// if the hook intentionally wants to kill server, let it.
    	if err != nil {
    		klog.Fatalf("PostStartHook %q failed: %v", name, err)
    	}
    	close(entry.done)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 8K bytes
    - Viewed (0)
  3. pkg/controlplane/controller/systemnamespaces/system_namespaces_controller.go

    		systemNamespaces: systemNamespaces,
    		interval:         interval,
    	}
    }
    
    // Run starts one worker.
    func (c *Controller) Run(stopCh <-chan struct{}) {
    	defer utilruntime.HandleCrash()
    	defer klog.Infof("Shutting down system namespaces controller")
    
    	klog.Infof("Starting system namespaces controller")
    
    	if !cache.WaitForCacheSync(stopCh, c.namespaceSynced) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 12:19:56 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go

    //
    // Deprecated: Will be removed when the legacy polling methods are removed.
    func runConditionWithCrashProtection(condition ConditionFunc) (bool, error) {
    	defer runtime.HandleCrash()
    	return condition()
    }
    
    // runConditionWithCrashProtectionWithContext runs a ConditionWithContextFunc
    // with crash protection.
    //
    // Deprecated: Will be removed when the legacy polling methods are removed.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress.go

    	ctx := wait.ContextForChannel(stopCh)
    	if pr.contextMetadata != nil {
    		ctx = metadata.NewOutgoingContext(ctx, pr.contextMetadata)
    	}
    	go func() {
    		defer utilruntime.HandleCrash()
    		<-stopCh
    		pr.mux.Lock()
    		defer pr.mux.Unlock()
    		pr.stopped = true
    		pr.cond.Signal()
    	}()
    	timer := pr.clock.NewTimer(progressRequestPeriod)
    	defer timer.Stop()
    	for {
    		stopped := func() bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 24 09:56:38 UTC 2024
    - 3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go

    	ec.queue.AddAfter(key, timeout)
    }
    
    // Run starts the EstablishingController.
    func (ec *EstablishingController) Run(stopCh <-chan struct{}) {
    	defer utilruntime.HandleCrash()
    	defer ec.queue.ShutDown()
    
    	klog.Info("Starting EstablishingController")
    	defer klog.Info("Shutting down EstablishingController")
    
    	if !cache.WaitForCacheSync(stopCh, ec.crdSynced) {
    		return
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  7. pkg/controlplane/controller/apiserverleasegc/gc_controller.go

    		leasesSynced:   leaseInformer.HasSynced,
    		leaseNamespace: leaseNamespace,
    		gcCheckPeriod:  gcCheckPeriod,
    	}
    }
    
    // Run starts one worker.
    func (c *Controller) Run(stopCh <-chan struct{}) {
    	defer utilruntime.HandleCrash()
    	defer klog.Infof("Shutting down apiserver lease garbage collector")
    
    	klog.Infof("Starting apiserver lease garbage collector")
    
    	// we have a personal informer that is narrowly scoped, start it.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Apr 25 03:27:44 UTC 2021
    - 4.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/grpc_service.go

    	if err != nil {
    		return nil, fmt.Errorf("failed to create connection to %s, error: %v", endpoint, err)
    	}
    
    	s.kmsClient = kmsapi.NewKeyManagementServiceClient(s.connection)
    
    	go func() {
    		defer utilruntime.HandleCrash()
    
    		<-ctx.Done()
    		_ = s.connection.Close()
    	}()
    
    	return s, nil
    }
    
    // Decrypt a given data string to obtain the original byte data.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 23:18:16 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting.go

    		value:         initial,
    	}
    	if doneCh != nil {
    		activeCounter.Add(1) // count start of the following goroutine
    		go func() {
    			defer activeCounter.Add(-1) // count completion of this goroutine
    			defer runtime.HandleCrash()
    			activeCounter.Add(-1) // count suspension for channel receive
    			<-doneCh
    			// Whatever goroutine unblocked the preceding receive MUST
    			// have already accounted for this activation.
    			lock.Lock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 10 14:37:53 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go

    			defer wg.Done()
    			defer func() {
    				// HandleCrash has already called the crash handlers and it has been configured to utilruntime.ReallyCrash
    				// This block prevents the second panic from failing our process.
    				// This failure mode for the handler functions properly using the channel below.
    				recover()
    			}()
    			defer utilruntime.HandleCrash(
    				func(r interface{}) {
    					if r == nil {
    						return
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 20:24:12 UTC 2023
    - 13K bytes
    - Viewed (0)
Back to top