cron

package
v0.1.42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

*

  • @Author wangzhengjun
  • @Description
  • @Date 2021/9/8 下午4:22 *

Index

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 New

func New() (geCron *GECron, err error)

创建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) Run

func (cron *GECron) Run() (err error)

启动APP

func (*GECron) Use

func (cron *GECron) Use(handleFunc cronContext.HandleFunc)

注册中间件

func (*GECron) WithGEContext

func (cron *GECron) WithGEContext(geHandle gcontext.GEHandleFunc) cronContext.HandleFunc

闭包GE上下文

type GEJob

type GEJob struct {
	// contains filtered or unexported fields
}

封装Job,为了可以利用WrappedJob功能

func (*GEJob) Run

func (GEJob *GEJob) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL