type PriorityAndFairnessClassification …
var waitingMark …
var (
atomicMutatingExecuting …
atomicReadOnlyExecuting …
)
var (
atomicMutatingWaiting …
atomicReadOnlyWaiting …
)
var newInitializationSignal …
func truncateLogField(s string) string { … }
var initAPFOnce …
type priorityAndFairnessHandler …
func (h *priorityAndFairnessHandler) Handle(w http.ResponseWriter, r *http.Request) { … }
func WithPriorityAndFairness(
handler http.Handler,
longRunningRequestCheck apirequest.LongRunningRequestCheck,
fcIfc utilflowcontrol.Interface,
workEstimator flowcontrolrequest.WorkEstimatorFunc,
defaultRequestWaitLimit time.Duration,
) http.Handler { … }
func StartPriorityAndFairnessWatermarkMaintenance(stopCh <-chan struct{ … }
func setResponseHeaders(classification *PriorityAndFairnessClassification, w http.ResponseWriter) { … }
func tooManyRequests(req *http.Request, w http.ResponseWriter, retryAfter string) { … }
func getRequestWaitContext(ctx context.Context, defaultRequestWaitLimit time.Duration, clock utilsclock.PassiveClock) (context.Context, context.CancelFunc) { … }