Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewErrorChannel (0.21 sec)

  1. pkg/scheduler/framework/parallelize/error_channel.go

    func (e *ErrorChannel) ReceiveError() error {
    	select {
    	case err := <-e.errCh:
    		return err
    	default:
    		return nil
    	}
    }
    
    // NewErrorChannel returns a new ErrorChannel.
    func NewErrorChannel() *ErrorChannel {
    	return &ErrorChannel{
    		errCh: make(chan error, 1),
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 20 17:39:23 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/parallelize/error_channel_test.go

    limitations under the License.
    */
    
    package parallelize
    
    import (
    	"context"
    	"errors"
    	"testing"
    )
    
    func TestErrorChannel(t *testing.T) {
    	errCh := NewErrorChannel()
    
    	if actualErr := errCh.ReceiveError(); actualErr != nil {
    		t.Errorf("expect nil from err channel, but got %v", actualErr)
    	}
    
    	err := errors.New("unknown error")
    	errCh.SendError(err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 20 17:39:23 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/preemption/preemption.go

    	fh := ev.Handler
    	cs := ev.Handler.ClientSet()
    
    	ctx, cancel := context.WithCancel(ctx)
    	defer cancel()
    	logger := klog.FromContext(ctx)
    	errCh := parallelize.NewErrorChannel()
    	preemptPod := func(index int) {
    		victim := c.Victims().Pods[index]
    		// If the victim is a WaitingPod, send a reject message to the PermitPlugin.
    		// Otherwise we should delete the victim.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 25.1K bytes
    - Viewed (0)
  4. pkg/scheduler/schedule_one.go

    	if !fwk.HasFilterPlugins() {
    		for i := range feasibleNodes {
    			feasibleNodes[i] = nodes[(sched.nextStartNodeIndex+i)%numAllNodes]
    		}
    		return feasibleNodes, nil
    	}
    
    	errCh := parallelize.NewErrorChannel()
    	var feasibleNodesLen int32
    	ctx, cancel := context.WithCancel(ctx)
    	defer cancel()
    
    	type nodeStatus struct {
    		node   string
    		status *framework.Status
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 13:28:08 UTC 2024
    - 43.4K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/runtime/framework.go

    		}
    		plugins = append(plugins, pl)
    		pluginToNodeScores[pl.Name()] = make(framework.NodeScoreList, len(nodes))
    	}
    	ctx, cancel := context.WithCancel(ctx)
    	defer cancel()
    	errCh := parallelize.NewErrorChannel()
    
    	if len(plugins) > 0 {
    		logger := klog.FromContext(ctx)
    		verboseLogs := logger.V(4).Enabled()
    		if verboseLogs {
    			logger = klog.LoggerWithName(logger, "Score")
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 60.9K bytes
    - Viewed (0)
Back to top