task

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLog = "_TASK_.debug"
	ErrorLog = "_TASK_.error"

	LogName     = logger.LogTag + "name"
	LogExecutor = logger.LogTag + "executor"
	LogError    = logger.LogTag + "error"
)

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Debug

type Debug struct{}

func (*Debug) Lock

func (m *Debug) Lock(ctx context.Context, _ string) context.Context

Lock tries to get the locker of the scheduler, should be blocked before acquired the locker.

func (*Debug) Unlock

func (m *Debug) Unlock(_ string)

Unlock gives up the schedule locker.

type Task

type Task struct{}

func (*Task) Schedule

func (c *Task) Schedule(spec string, exec task.Executor, opts ...task.Option) error

Jump to

Keyboard shortcuts

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