kubernetes/staging/src/k8s.io/apiserver/pkg/server/routine/routine.go

type taskKeyType

const taskKey

type Task

func WithTask(parent context.Context, t *Task) context.Context {}

// AppendTask appends a task executed after completion of existing task.
// It is a no-op if there is no existing task.
func AppendTask(ctx context.Context, t *Task) bool {}

func TaskFrom(ctx context.Context) *Task {}

// WithRoutine returns an http.Handler that executes preparation of long running requests (i.e. watches)
// in a separate Goroutine and then serves the long running request in the main Goroutine. Doing so allows
// freeing stack memory used in preparation Goroutine for better memory efficiency.
func WithRoutine(handler http.Handler, longRunning request.LongRunningRequestCheck) http.Handler {}