Documentation ¶
Overview ¶
Package lang Create on 2023/6/25 @author xuzhuoxi
Package lang Created by xuzhuoxi on 2019-03-21. @author xuzhuoxi
Package lang Created by xuzhuoxi on 2019-03-23. @author xuzhuoxi
Index ¶
- func Equal(a, b interface{}) bool
- func TypeEqual(a, b interface{}) (bool, reflect.Type)
- type Callback
- type ChannelLimit
- type ChannelLimitNone
- type FuncCallback
- type IChannelLimit
- type IChannelLimitHandler
- type IChannelLimitSwitch
- type IObjectPool
- type IPoolInstanceChecker
- type ISizeObjectPool
- type LChannelLimitMaxSetter
- type PoolCheckFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Callback ¶ added in v1.0.4
type Callback struct {
// contains filtered or unexported fields
}
func NewCallback ¶ added in v1.0.4
func NewCallback(call FuncCallback, args ...interface{}) *Callback
func (*Callback) SetCall ¶ added in v1.0.4
func (c *Callback) SetCall(call FuncCallback)
type ChannelLimit ¶
type ChannelLimit struct {
// contains filtered or unexported fields
}
func (*ChannelLimit) Add ¶
func (l *ChannelLimit) Add()
func (*ChannelLimit) Done ¶
func (l *ChannelLimit) Done()
func (*ChannelLimit) SetMax ¶
func (l *ChannelLimit) SetMax(max int)
func (*ChannelLimit) StartLimit ¶
func (l *ChannelLimit) StartLimit() bool
func (*ChannelLimit) StopLimit ¶
func (l *ChannelLimit) StopLimit() bool
type ChannelLimitNone ¶
type ChannelLimitNone struct{}
func (*ChannelLimitNone) Add ¶
func (l *ChannelLimitNone) Add()
func (*ChannelLimitNone) Done ¶
func (l *ChannelLimitNone) Done()
func (*ChannelLimitNone) SetMax ¶
func (l *ChannelLimitNone) SetMax(max int)
func (*ChannelLimitNone) StartLimit ¶
func (l *ChannelLimitNone) StartLimit() bool
func (*ChannelLimitNone) StopLimit ¶
func (l *ChannelLimitNone) StopLimit() bool
type FuncCallback ¶ added in v1.0.4
type FuncCallback = func(...interface{})
type IChannelLimit ¶
type IChannelLimit interface { LChannelLimitMaxSetter IChannelLimitSwitch IChannelLimitHandler }
type IChannelLimitHandler ¶
type IChannelLimitHandler interface { Add() Done() }
type IChannelLimitSwitch ¶
type IObjectPool ¶
type IObjectPool interface { Register(newFunc func() interface{}, check PoolCheckFunc) GetInstance() interface{} Recycle(instance interface{}) bool }
func NewObjectPool ¶
func NewObjectPool(sync bool) IObjectPool
func NewObjectPoolAsync ¶
func NewObjectPoolAsync() IObjectPool
func NewObjectPoolSync ¶
func NewObjectPoolSync() IObjectPool
func NewSizeObjectPool ¶
func NewSizeObjectPool(size int, sync bool) IObjectPool
type IPoolInstanceChecker ¶
type IPoolInstanceChecker interface {
SetCheckFunc(check PoolCheckFunc)
}
type ISizeObjectPool ¶
type ISizeObjectPool interface { SetMaxSize(size int) IObjectPool }
func NewSizeObjectPoolAsync ¶
func NewSizeObjectPoolAsync(size int) ISizeObjectPool
func NewSizeObjectPoolSync ¶
func NewSizeObjectPoolSync(size int) ISizeObjectPool
type LChannelLimitMaxSetter ¶
type LChannelLimitMaxSetter interface {
SetMax(max int)
}
type PoolCheckFunc ¶
type PoolCheckFunc func(instance interface{}) bool
Directories ¶
Path | Synopsis |
---|---|
Package listx Created by xuzhuoxi on 2019-04-03.
|
Package listx Created by xuzhuoxi on 2019-04-03. |
Click to show internal directories.
Click to hide internal directories.