kubernetes: k8s.io/kubernetes/pkg/scheduler/internal/parallelize Index | Files

package parallelize

import "k8s.io/kubernetes/pkg/scheduler/internal/parallelize"


Package Files

error_channel.go parallelism.go

func Until Uses

func Until(ctx context.Context, pieces int, doWorkPiece workqueue.DoWorkPieceFunc)

Until is a wrapper around workqueue.ParallelizeUntil to use in scheduling algorithms.

type ErrorChannel Uses

type ErrorChannel struct {
    // contains filtered or unexported fields

ErrorChannel supports non-blocking send and receive operation to capture error. A maximum of one error is kept in the channel and the rest of the errors sent are ignored, unless the existing error is received and the channel becomes empty again.

func NewErrorChannel Uses

func NewErrorChannel() *ErrorChannel

NewErrorChannel returns a new ErrorChannel.

func (*ErrorChannel) ReceiveError Uses

func (e *ErrorChannel) ReceiveError() error

ReceiveError receives an error from channel without blocking on the receiver.

func (*ErrorChannel) SendError Uses

func (e *ErrorChannel) SendError(err error)

SendError sends an error without blocking the sender.

func (*ErrorChannel) SendErrorWithCancel Uses

func (e *ErrorChannel) SendErrorWithCancel(err error, cancel context.CancelFunc)

SendErrorWithCancel sends an error without blocking the sender and calls cancel function.

Package parallelize imports 3 packages (graph) and is imported by 16 packages. Updated 2020-05-05. Refresh now. Tools for package owners.