func NewSimpleWorker(doWork func(stopCh <-chan struct{}) error) worker.Worker {
	w := &simpleWorker{}
	w.tomb.Go(func() error {
		return doWork(w.tomb.Dying())
	})
	return w
}
// NewSimpleWorker returns a worker that runs the given function.  The
// stopCh argument will be closed when the worker is killed. The error returned
// by the doWork function will be returned by the worker's Wait function.
NewSimpleWorker returns a worker that runs the given function.  The
stopCh argument will be closed when the worker is killed. The error returned
by the doWork function will be returned by the worker's Wait function.
// NewSimpleWorker returns a worker that runs the given function . The // stopCh argument will be closed when the worker is killed . The error returned // by the doWork function will be returned by the worker ' s Wait function .
func NewSimpleWorker(doWork func(stopCh <-chan struct{}) error) worker.Worker {
	w := &simpleWorker{}
	w.tomb.Go(func() error {
		return doWork(w.tomb.Dying())
	})
	return w
}
func NewSimpleWorker ( doWork func ( stopCh <- chan struct { } ) error ) worker . Worker { w := & simpleWorker { } w . tomb . Go ( func ( ) error { return doWork ( w . tomb . Dying ( ) ) } ) return w }
NewSimpleWorker returns a worker that runs the given function.
NewSimpleWorker returns a worker that runs the given function .