Documentation ¶
Index ¶
- Constants
- type Bitmap
- func (b *Bitmap) Clone() *Bitmap
- func (b *Bitmap) Exists(item uint32) bool
- func (b *Bitmap) Grow(item uint32)
- func (b *Bitmap) Init(maxNum uint32)
- func (b *Bitmap) Inverse()
- func (b *Bitmap) MaxU(x, y uint32) uint32
- func (b *Bitmap) Min(x, y int) int
- func (b *Bitmap) Set(item uint32) bool
- func (b *Bitmap) Sets(items []uint32)
- func (b *Bitmap) Union(b2 *Bitmap) *Bitmap
- type CHash
- type CHashNode
- type CHashRing
- type CallbackFunc
- type DataRow
- type DataSet
- type DataTable
- func (t *DataTable) Cols() []string
- func (t *DataTable) Indexes() []string
- func (t *DataTable) PkCol() string
- func (t *DataTable) PkInt(row *DataRow) int
- func (t *DataTable) PkString(row *DataRow) string
- func (t *DataTable) Push(row []string)
- func (t *DataTable) PushAll(rows [][]string)
- func (t *DataTable) Row(pk string) *DataRow
- func (t *DataTable) Rows() (rows []*DataRow)
- func (t *DataTable) RowsBy(indexName, indexValue string) []*DataRow
- type LightTimer
- func (lt *LightTimer) AddCallback(d time.Duration, callback func()) *Timer
- func (lt *LightTimer) AddTimer(d time.Duration, callback CallbackFunc) *Timer
- func (lt *LightTimer) AddTimerWithDeadline(d time.Duration, deadline time.Time, callback CallbackFunc, ...) *Timer
- func (lt *LightTimer) StartTicks(tickInterval time.Duration)
- type LightTimerPool
- type Timer
Constants ¶
View Source
const (
MIN_TIMER_INTERVAL = 1 * time.Millisecond
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackFunc ¶
定时执行函数 入参回调执行序号(次数) 回参是否完成,true停止执行,false继续执行,在dealine的callback中无效
type DataTable ¶
type DataTable struct {
// contains filtered or unexported fields
}
func NewDataTable ¶
type LightTimer ¶
type LightTimer struct {
// contains filtered or unexported fields
}
func NewLightTimer ¶
func NewLightTimer() *LightTimer
func (*LightTimer) AddCallback ¶
func (lt *LightTimer) AddCallback(d time.Duration, callback func()) *Timer
Add a callback which will be called after specified duration
func (*LightTimer) AddTimer ¶
func (lt *LightTimer) AddTimer(d time.Duration, callback CallbackFunc) *Timer
func (*LightTimer) AddTimerWithDeadline ¶
func (lt *LightTimer) AddTimerWithDeadline(d time.Duration, deadline time.Time, callback CallbackFunc, deadlineCallback CallbackFunc) *Timer
Add a timer which calls callback periodly
func (*LightTimer) StartTicks ¶
func (lt *LightTimer) StartTicks(tickInterval time.Duration)
Start the self-ticking routine, which ticks per tickInterval
type LightTimerPool ¶
type LightTimerPool struct {
// contains filtered or unexported fields
}
func NewLightTimerPool ¶
func NewLightTimerPool(size int, tickInterval time.Duration) *LightTimerPool
func (*LightTimerPool) AddCallback ¶
func (p *LightTimerPool) AddCallback(key string, d time.Duration, callback func())
func (*LightTimerPool) AddTimer ¶
func (p *LightTimerPool) AddTimer(key string, d time.Duration, callback CallbackFunc)
func (*LightTimerPool) AddTimerWithDeadline ¶
func (p *LightTimerPool) AddTimerWithDeadline(key string, d time.Duration, deadline time.Time, callback CallbackFunc, deadlineCallback CallbackFunc)
Click to show internal directories.
Click to hide internal directories.