task

package
v0.0.0-...-08474b0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Test

func Test()

Types

type Factory

type Factory struct {
	SwaggerCron       *service.SwaggerCron       `inject:""`
	LecangCronService *service.LecangCronService `inject:""`
	// contains filtered or unexported fields
}

func (*Factory) Create

func (e *Factory) Create() (res Task)

type Proxy

type Proxy struct {
	ServerCron         *cron.ServerCron            `inject:""`
	Factory            *Factory                    `inject:""`
	ProjectCronService *service.ProjectCronService `inject:""`
	// contains filtered or unexported fields
}

func (*Proxy) Add

func (p *Proxy) Add(options map[string]interface{}) (err error)

func (*Proxy) GetTaskId

func (p *Proxy) GetTaskId() (taskId string)

func (*Proxy) Init

func (p *Proxy) Init(tenantId consts.TenantId, source consts.CronSource, beforeCall func(tenantId consts.TenantId, taskId string, source consts.CronSource) error, callBack func(tenantId consts.TenantId, taskId string, source consts.CronSource, err error) error, taskId, cron string)

func (*Proxy) Remove

func (p *Proxy) Remove()

func (Proxy) Run

func (p Proxy) Run(options map[string]interface{})

type Task

type Task interface {
	Run(options map[string]interface{}) (f func() error)
	CallBack(options map[string]interface{}, err error) func()
}

Jump to

Keyboard shortcuts

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