job

package
v0.0.0-...-fc405d0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(t task.Task, dest string)

Listen is running a job with specific job path than are registered before

Types

type HandlerTask

type HandlerTask func(string, int)

func (HandlerTask) Add

func (h HandlerTask) Add(s string, i int)

type Job

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

func NewJob

func NewJob() *Job

NewJob create new job

func (*Job) Add

func (j *Job) Add(s string, i int)

func (*Job) Handle

func (j *Job) Handle(s string, t task.Task)

Handle is register and handle new job Handle take 2 parameter is job path and Task interface that implement Add(string, int) function

func (*Job) HandleFunc

func (j *Job) HandleFunc(s string, h HandlerTask)

Jump to

Keyboard shortcuts

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