Documentation
¶
Index ¶
Constants ¶
const REQ_CHAN_CAPACITY = 10
REQ_CHAN_CAPACITY is the capacity of the channel into which are submitted new requests. This is used as a back off mechanism if the submitter is much faster than the finder.
const WORKER_CHAN_CAPACITY = 10
WORKER_CHAN_CAPACITY is the maximum number of unhandled requests that may be to the worker, before a call to handle() is blocking.
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 retrieval of zone cuts/delegation information of requested zones.
func NewFinder ¶
func NewFinder(nrHandler func(*nameresolver.Request) *errors.ErrorStack, conf *tools.TransdepConfig) *Finder
NewFinder builds a new Finder instance and starts the associated goroutine for request handling.
nrHandler is the function to call to submit new name resolution requests
maxWorkerCount is the maximum number of simultaneously live zone cut workers. Once this number is reached, the least recently used worker is shut down and a new worker is started to handle the new request.
cacheRootDir is the root directory for caching
rootHints is the name of the file from which the root hints should be loaded.