Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for AggregateGoroutines (0.29 sec)

  1. staging/src/k8s.io/apiserver/pkg/audit/union.go

    	var funcs []func() error
    	for _, backend := range u.backends {
    		backend := backend
    		funcs = append(funcs, func() error {
    			return backend.Run(stopCh)
    		})
    	}
    	return errors.AggregateGoroutines(funcs...)
    }
    
    func (u union) Shutdown() {
    	for _, backend := range u.backends {
    		backend.Shutdown()
    	}
    }
    
    func (u union) String() string {
    	var backendStrings []string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 20 09:51:25 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/errors/errors.go

    		case 1:
    			return agg.Errors()[0]
    		case 0:
    			return nil
    		}
    	}
    	return err
    }
    
    // AggregateGoroutines runs the provided functions in parallel, stuffing all
    // non-nil errors into the returned Aggregate.
    // Returns nil if all the functions complete successfully.
    func AggregateGoroutines(funcs ...func() error) Aggregate {
    	errChan := make(chan error, len(funcs))
    	for _, f := range funcs {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 29 09:44:02 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/errors/errors_test.go

    	for i, testCase := range testCases {
    		funcs := make([]func() error, len(testCase.errs))
    		for i := range testCase.errs {
    			err := testCase.errs[i]
    			funcs[i] = func() error { return err }
    		}
    		agg := AggregateGoroutines(funcs...)
    		if agg == nil {
    			if len(testCase.expected) > 0 {
    				t.Errorf("%d: expected %v, got nil", i, testCase.expected)
    			}
    			continue
    		}
    		if len(agg.Errors()) != len(testCase.expected) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jul 24 13:16:21 UTC 2022
    - 12.7K bytes
    - Viewed (0)
Back to top