Documentation ¶
Overview ¶
*
- @Author wangzhengjun
- @Description
- @Date 2021/9/8 下午4:22 *
Index ¶
- type GECron
- func (cron *GECron) AddJob(name string, spec string, funcs ...cronContext.HandleFunc) (err error)
- func (cron *GECron) AddJobWithParams(name string, spec string, params []string, funcs ...cronContext.HandleFunc) (err error)
- func (cron *GECron) RegisterRouter(name string, funcs ...cronContext.HandleFunc)
- func (cron *GECron) Run() (err error)
- func (cron *GECron) Use(handleFunc cronContext.HandleFunc)
- func (cron *GECron) WithGEContext(geHandle gcontext.GEHandleFunc) cronContext.HandleFunc
- type GEJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GECron ¶
type GECron struct {
// contains filtered or unexported fields
}
Cron框架实例
func (*GECron) AddJob ¶
func (cron *GECron) AddJob(name string, spec string, funcs ...cronContext.HandleFunc) (err error)
注册定时任务
func (*GECron) AddJobWithParams ¶
func (cron *GECron) AddJobWithParams(name string, spec string, params []string, funcs ...cronContext.HandleFunc) (err error)
AddJobWithParams 添加带参数的
func (*GECron) RegisterRouter ¶
func (cron *GECron) RegisterRouter(name string, funcs ...cronContext.HandleFunc)
注册路由规则
func (*GECron) WithGEContext ¶
func (cron *GECron) WithGEContext(geHandle gcontext.GEHandleFunc) cronContext.HandleFunc
闭包GE上下文
Click to show internal directories.
Click to hide internal directories.