ytask

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type YTask

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

func NewYTask

func NewYTask(c config.Config) YTask

func (*YTask) Add

func (t *YTask) Add(group string, w yworker.WorkerInterface)

func (*YTask) Get

func (t *YTask) Get(groupName string) (ymsg.Message, error)

func (*YTask) Run

func (t *YTask) Run(groupName string, numWorkers int)

func (*YTask) Send

func (t *YTask) Send(groupName string, values ...interface{}) error

send task

t.Send("xx", ymsg.Message{} )

t.Send("xx", "workerName1" , User{1,"name"} )

t.Send("xx", "workerName1" , "userJsonString" )

func (*YTask) Shutdown

func (t *YTask) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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