package pool
Import Path
go.uber.org/zap/internal/pool (on go.dev)
Dependency Relation
imports one package, and imported by 4 packages
Involved Source Files
Package pool provides internal pool utilities.
Package-Level Type Names (only one, which is exported)
Type Parameters:
T: any
A Pool is a generic wrapper around [sync.Pool] to provide strongly-typed
object pooling.
Note that SA6002 (ref: https://staticcheck.io/docs/checks/#SA6002) will
not be detected, so all internal pool use must take care to only store
pointer types.
pool sync.Pool
Get gets a T from the pool, or creates a new one if the pool is empty.
Put returns x into the pool.
func New[T](fn func() T) *Pool[T]
var go.uber.org/zap/internal/stacktrace._stackPool *pool.Pool[...]
var go.uber.org/zap._errArrayElemPool *pool.Pool[...]
var go.uber.org/zap/zapcore._cePool *pool.Pool[...]
var go.uber.org/zap/zapcore._errArrayElemPool *pool.Pool[...]
var go.uber.org/zap/zapcore._jsonPool *pool.Pool[...]
var go.uber.org/zap/zapcore._sliceEncoderPool *pool.Pool[...]
Package-Level Functions (only one, which is exported)
Type Parameters:
T: any
New returns a new [Pool] for T, and will use fn to construct new Ts when
the pool is empty.
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |