Documentation ¶
Overview ¶
Depfinder package contains the DNS dependency finder. Its purpose is to provide a request channel, and to build the dependency graph of a requested domain name.
Index ¶
Constants ¶
const REQ_CHAN_CAPACITY = 10
REQ_CHAN_CAPACITY indicates the maximum number of requests that can be queued to a dependency finder instance, before the write call is blocking.
const WORKER_CHAN_CAPACITY = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
Finder is a worker pool maintainer for the construction of dependency trees of domain names.
func NewFinder ¶
func NewFinder(transdepConf *tools.TransdepConfig, tree *iradix.Tree) *Finder
NewFinder initializes a new dependency finder struct instance.
dependencyWorkerCount designates the maximum number of workers simultaneously live for dependency tree construction.
zoneCutWorkerCount designates the maximum number of workers simultaneously live for zone cut/delegation information retrieval. nameResolverWorkerCount designates the maximum number of workers simultaneously live for name resolution.
cacheRootDir designates the root cache directory in which the on-disk cache will be stored. The directory will be created if it does not already exist.
rootHints is the name of the file from which the root hints should be loaded.
func (*Finder) Handle ¶
func (df *Finder) Handle(req *dependency.Request) *errors.ErrorStack
Handle is the function called to submit new requests. Caller may call req.Result() after calling Handle(req) to get the result of that Handle call. This method returns an error if the Finder is stopped.