重新设计Crontabex
This commit is contained in:
parent
88b8d4030f
commit
c6d2fa906c
15
crontab.go
Normal file
15
crontab.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package crontabex
|
||||
|
||||
import "time"
|
||||
|
||||
// ICrontab 时间到
|
||||
type ICrontab interface {
|
||||
TimeIsUp() bool
|
||||
NextTime() time.Time
|
||||
Set(...interface{}) // 默认不忽略
|
||||
Get(...interface{})
|
||||
}
|
||||
|
||||
// Crontab
|
||||
type Crontab struct {
|
||||
}
|
7
crontab_test.go
Normal file
7
crontab_test.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package crontabex
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestCrontabex(t *testing.T) {
|
||||
|
||||
}
|
10
plan_time.go
Normal file
10
plan_time.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package crontabex
|
||||
|
||||
// PlanTime
|
||||
type PlanTime struct {
|
||||
}
|
||||
|
||||
// TrieTime
|
||||
type TrieTime struct {
|
||||
everyYear int
|
||||
}
|
Loading…
Reference in New Issue
Block a user