func initNewWorker(req *nameresolver.Request, nrHandler func(*nameresolver.Request) *errors.ErrorStack, zcHandler func(*zonecut.Request) *errors.ErrorStack, conf *tools.TransdepConfig) *worker {
	w := new(worker)
	w.req = req
	w.zcHandler = zcHandler
	w.nrHandler = nrHandler
	w.config = conf
	w.reqs = make(chan *nameresolver.Request, WORKER_CHAN_CAPACITY)
	w.closedReqChan = false
	w.joinChan = make(chan bool, 1)
	return w
}
initNewWorker builds a new worker instance and returns it.
It DOES NOT start the new worker, and should not be called directly by the finder.
package nameresolver
import (
	"fmt"
	"github.com/miekg/dns"
	"net"
	"github.com/ANSSI-FR/transdep/messages/zonecut"
	"github.com/ANSSI-FR/transdep/tools"
	"github.com/ANSSI-FR/transdep/messages/nameresolver"
	"github.com/ANSSI-FR/transdep/errors"
	"strings"
)
const WORKER_CHAN_CAPACITY = 10
const MAX_CNAME_CHAIN = 10
type worker struct {
	req           *nameresolver.Request
	reqs          chan *nameresolver.Request
	closedReqChan bool
	joinChan      chan bool
	zcHandler     func(*zonecut.Request) *errors.ErrorStack
	nrHandler     func(*nameresolver.Request) *errors.ErrorStack
	config    *tools.TransdepConfig
}