mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	middleware/proxy: implement Exchanger (#480)
By defining and using an proxy.Exchanger interface we make the proxy more generic and we can then fold back httproxy into proxy. This overrides #463 and #473 and should make futures extensions rather trivial * Add docs that talk about `protocol` and how to set it. * middleware/proxy: rename New to NewLookup It's used as a Lookup mechanism not as a completely new proxy, reflect that in the name. * Set maxfails to 3 by default when looking up names. Most of the changes have been copied from https://github.com/johnbelamaric/coredns/pull/1/files
This commit is contained in:
		| @@ -93,7 +93,7 @@ func TestLookupCNAMEExternal(t *testing.T) { | ||||
| 	if err != nil { | ||||
| 		t.Fatalf("Expected no error when reading zone, got %q", err) | ||||
| 	} | ||||
| 	zone.Proxy = proxy.New([]string{"8.8.8.8:53"}) // TODO(miek): point to local instance | ||||
| 	zone.Proxy = proxy.NewLookup([]string{"8.8.8.8:53"}) // TODO(miek): point to local instance | ||||
|  | ||||
| 	fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{name: zone}, Names: []string{name}}} | ||||
| 	ctx := context.TODO() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user