Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pooler ¶
func NewPool ¶
func NewPool[T any]( initFunction func() *T, opt *PoolingOptions, ) (Pooler[T], error)
NewPool creates a new pool of entities params:
- initFunction: func() *T => function that returns a new entity<T>
- opt: *PoolingOptions => options for the pool
returns:
- Pooler<T>: pool of entities
- error: error if any
type PoolingOptions ¶
type PoolingOptions struct {
PoolSize int
}
PoolingOptions is the options for the pool params:
- PoolSize: int => size of the pool
Click to show internal directories.
Click to hide internal directories.