Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectIchubResultPool ¶
func InjectIchubResultPool(s *IchubResultPool)
func InjectPageResultPool ¶
func InjectPageResultPool(s *PageResultPool)
func LoadIchubResultPool ¶
func LoadIchubResultPool() baseiface.ISingleton
func LoadPageResultPool ¶
func LoadPageResultPool() baseiface.ISingleton
Types ¶
type GeneralObjectPool ¶
type GeneralObjectPool[T baseiface.IpoolObj] struct { CommonPool *pool.ObjectPool }
func NewGeneralObjectPool ¶
func NewGeneralObjectPool[T baseiface.IpoolObj]() *GeneralObjectPool[T]
NewGeneralObjectPool 使用传入的上下文初始化连接池
func (*GeneralObjectPool[T]) BorrowObject ¶
func (self *GeneralObjectPool[T]) BorrowObject(ctx context.Context) (T, error)
BorrowObject 从连接池借用对象,增加了错误处理和重试逻辑
func (*GeneralObjectPool[T]) Link ¶
func (self *GeneralObjectPool[T]) Link() (T, error)
Link 初始化连接,通过指针类型初始化对象
func (*GeneralObjectPool[T]) ReturnObject ¶
func (self *GeneralObjectPool[T]) ReturnObject(ctx context.Context, object T) error
ReturnObject 交还对象到连接池
type IchubResultPool ¶
type IchubResultPool struct { basedto.BaseEntitySingle *GeneralObjectPool[*basedto.IchubResult] }
func FindBeanIchubResultPool ¶
func FindBeanIchubResultPool() *IchubResultPool
FindBeanIchubResultPool
func NewIchubResultPool ¶
func NewIchubResultPool() *IchubResultPool
type PageResultPool ¶
type PageResultPool struct { basedto.BaseEntitySingle *GeneralObjectPool[*page.PageResult] }
func NewPageResultPool ¶
func NewPageResultPool() *PageResultPool
Click to show internal directories.
Click to hide internal directories.