Documentation ¶ Index ¶ type Pool func (p *Pool[T]) CloseAll() func (p *Pool[T]) Get(key any) *T Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Pool ¶ type Pool[T any] struct { Pool sync.Map Create func(key any) *T LockForCreate bool // 批量Create时建议加锁 Close func(key, value any) bool // contains filtered or unexported fields } func (*Pool[T]) CloseAll ¶ added in v1.0.21 func (p *Pool[T]) CloseAll() func (*Pool[T]) Get ¶ func (p *Pool[T]) Get(key any) *T Source Files ¶ View all Source files pool.go Click to show internal directories. Click to hide internal directories.