task

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTasker

func RegisterTasker(name string, fn generator)

RegisterTasker register an tasker to manager

Types

type Option

type Option func(map[string]string)

Option task option

func WithAddKV

func WithAddKV(key, value string) Option

WithAddKV wrap the key and value to an option

type Tasker

type Tasker interface {
	Run(ctx context.Context)
	Handle(handler func())
}

Tasker interface

func GenerateTasker

func GenerateTasker(name string, ops ...Option) (Tasker, error)

GenerateTasker generate an tasker by name from manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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