 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package timer 群管定时器
Index ¶
- type Clock
- func (c *Clock) AddTimerIntoDB(t *Timer) (err error)
- func (c *Clock) AddTimerIntoMap(t *Timer) (err error)
- func (c *Clock) CancelTimer(key uint32) bool
- func (c *Clock) GetTimer(key uint32) (t *Timer, ok bool)
- func (c *Clock) ListTimers(grpID int64) []string
- func (c *Clock) RegisterTimer(ts *Timer, save, isinit bool) bool
 
- type Timer
- func (t *Timer) Day() (d int)
- func (t *Timer) En() (en bool)
- func (t *Timer) GetTimerID() uint32
- func (t *Timer) GetTimerInfo() string
- func (t *Timer) Hour() (h int)
- func (t *Timer) InsertInto(db *sql.Sqlite) error
- func (t *Timer) Minute() (min int)
- func (t *Timer) Month() (mon time.Month)
- func (t *Timer) SetDay(d int)
- func (t *Timer) SetEn(en bool)
- func (t *Timer) SetHour(h int)
- func (t *Timer) SetMinute(min int)
- func (t *Timer) SetMonth(mon time.Month)
- func (t *Timer) SetWeek(w time.Weekday)
- func (t *Timer) Week() (w time.Weekday)
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
	// contains filtered or unexported fields
}
    Clock 时钟
func (*Clock) AddTimerIntoDB ¶
AddTimerIntoDB 添加定时器
func (*Clock) AddTimerIntoMap ¶
AddTimerIntoMap 添加定时器到缓存
type Timer ¶
type Timer struct {
	ID                          uint32 `db:"id"`
	En1Month4Day5Week3Hour5Min6 int32  `db:"emdwhm"`
	SelfID                      int64  `db:"sid"`
	GrpID                       int64  `db:"gid"`
	Alert                       string `db:"alert"`
	Cron                        string `db:"cron"`
	URL                         string `db:"url"`
}
    Timer 计时器
func GetFilledCronTimer ¶
GetFilledCronTimer 获得以cron填充好的ts
func GetFilledTimer ¶
GetFilledTimer 获得填充好的ts
 Click to show internal directories. 
   Click to hide internal directories.