func NewStringsWorker(config StringsConfig) (*StringsWorker, error) {
	if err := config.Validate(); err != nil {
		return nil, errors.Trace(err)
	}
	sw := &StringsWorker{
		config: config,
	}
	err := catacomb.Invoke(catacomb.Plan{
		Site: &sw.catacomb,
		Work: sw.loop,
	})
	if err != nil {
		return nil, errors.Trace(err)
	}
	return sw, nil
}
// NewStringsWorker starts a new worker that runs a StringsHandler.
NewStringsWorker starts a new worker that runs a StringsHandler.
// NewStringsWorker starts a new worker that runs a StringsHandler .
func NewStringsWorker(config StringsConfig) (*StringsWorker, error) {
	if err := config.Validate(); err != nil {
		return nil, errors.Trace(err)
	}
	sw := &StringsWorker{
		config: config,
	}
	err := catacomb.Invoke(catacomb.Plan{
		Site: &sw.catacomb,
		Work: sw.loop,
	})
	if err != nil {
		return nil, errors.Trace(err)
	}
	return sw, nil
}
func NewStringsWorker ( config StringsConfig ) ( * StringsWorker , error ) { if err := config . Validate ( ) ; err != nil { return nil , errors . Trace ( err ) } sw := & StringsWorker { config : config , } err := catacomb . Invoke ( catacomb . Plan { Site : & sw . catacomb , Work : sw . loop , } ) if err != nil { return nil , errors . Trace ( err ) } return sw , nil }
NewStringsWorker starts a new worker that runs a StringsHandler.
NewStringsWorker starts a new worker that runs a StringsHandler .