gitee.com/sy_183/go-common@v1.0.5-0.20231205030221-958cfe129b47/pool/pool.go (about)

     1  package pool
     2  
     3  import "gitee.com/sy_183/go-common/option"
     4  
     5  type Pool[O any] interface {
     6  	Get() O
     7  
     8  	Put(obj O)
     9  }
    10  
    11  type PoolProvider[O any] func(new func(p Pool[O]) O, options ...option.AnyOption) Pool[O]