func (w *worker) resolveSelf() (graph.Node, *errors.ErrorStack) {
	g := graph.NewRelationshipNode(fmt.Sprintf("Dependency graph of exact name %s", w.req.Name()), graph.AND_REL)
	nr := nameresolver.NewRequest(w.req.Name(), w.req.Exceptions())
	w.nrHandler(nr)
	var ne *nameresolver.Entry
	ne, err := nr.Result()
	if err != nil {
		err.Push(fmt.Errorf("resolveSelf: error while getting the exact resolution of %s", w.req.Name()))
		return nil, err
	}
	if ne.CNAMETarget() != "" {
		if !w.req.FollowAlias() {
			return nil, errors.NewErrorStack(fmt.Errorf("resolveSelf: alias detected (%s) but alias is not requested to be added to the graph of %s", ne.CNAMETarget(), w.req.Name()))
		}
		g.AddChild(graph.NewAliasNode(ne.CNAMETarget(), ne.Owner()))
		depReq := dependency.NewRequestWithContext(ne.CNAMETarget(), w.req.FollowAlias(), w.req.IncludeIP(), w.req, w.req.Depth()+1)
		w.depHandler(depReq)
		aliasGraph, err := depReq.Result()
		if err != nil {
			err.Push(fmt.Errorf("resolveSelf: error while getting the dependency graph of alias %s", ne.CNAMETarget()))
			return nil, err
		}
		g.AddChild(aliasGraph)
	} else if w.req.IncludeIP() {
		gIP := graph.NewRelationshipNode(fmt.Sprintf("IPs of %s", ne.Owner()), graph.OR_REL)
		g.AddChild(gIP)
		for _, addr := range ne.Addrs() {
			asn, err := radix.GetASNFor(w.tree, addr)
			if err != nil {
				asn = 0
			}
			gIP.AddChild(graph.NewIPNodeWithName(addr.String(), ne.Owner(), asn))
		}
	}
	return g, nil
}
resolveSelf returns the graph of the current requestTopic
package dependency
import (
	"fmt"
	"github.com/hashicorp/go-immutable-radix"
	"github.com/miekg/dns"
	"github.com/ANSSI-FR/transdep/graph"
	"github.com/ANSSI-FR/transdep/messages/dependency"
	"github.com/ANSSI-FR/transdep/messages/nameresolver"
	"github.com/ANSSI-FR/transdep/messages/zonecut"
	"github.com/ANSSI-FR/transdep/tools"
	"github.com/ANSSI-FR/transdep/tools/radix"
	"github.com/ANSSI-FR/transdep/errors"
)
const WORKER_CHAN_CAPACITY = 10
type worker struct {
	req *dependency.Request
	reqs chan *dependency.Request
	joinChan chan bool
	closedReqChan bool
	tree *iradix.Tree
	depHandler func(*dependency.Request) *errors.ErrorStack
	zcHandler func(request *zonecut.Request) *errors.ErrorStack
	nrHandler func(*nameresolver.Request) *errors.ErrorStack
	config    *tools.TransdepConfig
}
func newWorker(req *dependency.Request, depHandler func(*dependency.Request) *errors.ErrorStack, zcHandler func(request *zonecut.Request) *errors.ErrorStack, nrHandler func(*nameresolver.Request) *errors.ErrorStack, conf *tools.TransdepConfig, tree *iradix.Tree) *worker {
	w := new(worker)
	w.req = req
	w.reqs = make(chan *dependency.Request, WORKER_CHAN_CAPACITY)
	w.closedReqChan = false
	w.joinChan = make(chan bool, 1)
	w.config = conf
	w.tree = tree
	w.depHandler = depHandler
	w.zcHandler = zcHandler
	w.nrHandler = nrHandler
	w.start()
	return w
}
func (w *worker) handle(req *dependency.Request) *errors.ErrorStack {
	if w.closedReqChan {
		return errors.NewErrorStack(fmt.Errorf("handle: dependency worker channel for %s is already closed", w.req.Name()))
	} else if !w.req.Equal(req) {
		return errors.NewErrorStack(fmt.Errorf("handle: invalid request; the submitted request (%s) does not match the requests handled by this worker (%s)", req.Name(), w.req.Name()))
	}
	w.reqs <- req
	return nil
}
func (w *worker) resolveRoot() graph.Node {
	g := graph.NewRelationshipNode("resolveRoot: dependency graph of the root zone", graph.AND_REL)
	g.AddChild(graph.NewDomainNameNode(".", true))
	return g
}
func (w *worker) getParentGraph() (graph.Node, *errors.ErrorStack) {
	nxtLblPos, end := dns.NextLabel(w.req.Name(), 1)
	shrtndName := "."
	if !end {
		shrtndName = w.req.Name()[nxtLblPos:]
	}
	req := dependency.NewRequestWithContext(shrtndName, false, false, w.req, 0)
	w.depHandler(req)
	res, err := req.Result()
	if err != nil {
		err.Push(fmt.Errorf("getParentGraph: error during resolution of parent graph %s of %s", shrtndName, w.req.Name()))
		return nil, err
	}
	return res, nil
}