plugin/forward: expose few methods and attributes to public (#1766)

* plugin/forward: expose few methods and attributes to public

* Update comments
This commit is contained in:
Eugen Kleiner
2018-05-04 08:47:26 +03:00
committed by Miek Gieben
parent 59dbcd32ea
commit be8fcc484a
5 changed files with 21 additions and 11 deletions

View File

@@ -33,7 +33,8 @@ func (p *Proxy) updateRtt(newRtt time.Duration) {
atomic.AddInt64(&p.avgRtt, int64((newRtt-rtt)/rttCount))
}
func (p *Proxy) connect(ctx context.Context, state request.Request, forceTCP, metric bool) (*dns.Msg, error) {
// Connect selects an upstream, sends the request and waits for a response.
func (p *Proxy) Connect(ctx context.Context, state request.Request, forceTCP, metric bool) (*dns.Msg, error) {
start := time.Now()
proto := state.Proto()