func NewNotifyWorker(config NotifyConfig) (*NotifyWorker, error) {
	if err := config.Validate(); err != nil {
		return nil, errors.Trace(err)
	}
	nw := &NotifyWorker{
		config: config,
	}
	err := catacomb.Invoke(catacomb.Plan{
		Site: &nw.catacomb,
		Work: nw.loop,
	})
	if err != nil {
		return nil, errors.Trace(err)
	}
	return nw, nil
}
// NewNotifyWorker starts a new worker that runs a NotifyHandler.
NewNotifyWorker starts a new worker that runs a NotifyHandler.
// NewNotifyWorker starts a new worker that runs a NotifyHandler .
func NewNotifyWorker(config NotifyConfig) (*NotifyWorker, error) {
	if err := config.Validate(); err != nil {
		return nil, errors.Trace(err)
	}
	nw := &NotifyWorker{
		config: config,
	}
	err := catacomb.Invoke(catacomb.Plan{
		Site: &nw.catacomb,
		Work: nw.loop,
	})
	if err != nil {
		return nil, errors.Trace(err)
	}
	return nw, nil
}
func NewNotifyWorker ( config NotifyConfig ) ( * NotifyWorker , error ) { if err := config . Validate ( ) ; err != nil { return nil , errors . Trace ( err ) } nw := & NotifyWorker { config : config , } err := catacomb . Invoke ( catacomb . Plan { Site : & nw . catacomb , Work : nw . loop , } ) if err != nil { return nil , errors . Trace ( err ) } return nw , nil }
NewNotifyWorker starts a new worker that runs a NotifyHandler.
NewNotifyWorker starts a new worker that runs a NotifyHandler .