mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-08-08 20:50:36 +00:00
Picks up: - kubernetes/kube-openapi#625: update the go-openapi/swag family to v0.27.1 - kubernetes/kube-openapi#622: propagate nullable field between SMD and OpenAPI schemas Transitive dependency changes: - github.com/go-openapi/swag (and submodules) v0.25.4 -> v0.27.1 - github.com/go-openapi/jsonpointer v0.22.4 -> v1.0.0 - github.com/go-openapi/jsonreference v0.21.4 -> v1.0.0 - github.com/go-openapi/swag/jsonname removed (package now provided by jsonpointer) - github.com/go-openapi/swag/pools added No changes to hack/unwanted-dependencies.json needed.
27 lines
946 B
Go
27 lines
946 B
Go
// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Package pools provide utilities to recycle allocated objects.
|
|
//
|
|
// This package provides:
|
|
//
|
|
// - a generic [Pool] type that wraps [sync.Pool],
|
|
// - a [PoolRedeemable] variant that hands out a cached redeem closure,
|
|
// - a [PoolSlice] for recycling slices without juggling pointers.
|
|
//
|
|
// # Debug build
|
|
//
|
|
// Building with the "poolsdebug" tag (go test -tags poolsdebug ./...) turns on
|
|
// instrumentation that tracks every borrow and redeem and panics on misuse:
|
|
//
|
|
// - double redeem (including the A -> B -> A case for the redeemable pools),
|
|
// - redeem of a foreign object,
|
|
// - borrow of an object still checked out
|
|
//
|
|
// It reports the offending call sites.
|
|
//
|
|
// [AssertNoLeaks] then reports any object borrowed but never redeemed.
|
|
//
|
|
// The instrumentation is a no-op with zero overhead when the tag is absent.
|
|
package pools
|