apiserverk8s.io/apiserver/pkg/server/routine Index | Files

package routine

import "k8s.io/apiserver/pkg/server/routine"

Index

Functions

func AppendTask

func AppendTask(ctx context.Context, t *Task) bool

AppendTask appends a task executed after completion of existing task. It is a no-op if there is no existing task.

func WithRoutine

func WithRoutine(handler http.Handler, longRunning request.LongRunningRequestCheck) http.Handler

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 WithTask

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

Types

type Task

type Task struct {
	Func func()
}

func TaskFrom

func TaskFrom(ctx context.Context) *Task

Source Files

routine.go

Version
v0.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
7 hours ago

Tools for package owners.