Add proxy and forward options (#149)

This commit is contained in:
Sandeep Rajan 2019-04-16 11:55:24 -04:00 committed by Chris O'Haver
parent d8ad9b2d44
commit 631694b4e3
2 changed files with 357 additions and 35 deletions

View file

@ -101,7 +101,19 @@ var Versions = map[string]release{
action: proxyToForwardPluginAction,
options: proxyToForwardOptionsMigrations,
},
"forward": {},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -167,7 +179,19 @@ var Versions = map[string]release{
action: proxyToForwardPluginAction,
options: proxyToForwardOptionsMigrations,
},
"forward": {},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -240,8 +264,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -295,8 +341,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -360,8 +428,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -405,8 +495,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -450,8 +562,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -495,8 +629,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -555,8 +711,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -599,8 +777,30 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -643,8 +843,33 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {
status: removed,
action: proxyRemoveHttpsGoogleProtocol,
},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"prefer_udp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -686,8 +911,32 @@ var Versions = map[string]release{
},
},
"prometheus": {},
"proxy": {},
"forward": {},
"proxy": {
options: map[string]option{
"policy": {},
"fail_timeout": {},
"max_fails": {},
"health_check": {},
"except": {},
"spray": {},
"protocol": {
status: ignored,
action: proxyRemoveHttpsGoogleProtocol,
},
},
},
"forward": {
options: map[string]option{
"except": {},
"force_tcp": {},
"expire": {},
"max_fails": {},
"tls": {},
"tls_servername": {},
"policy": {},
"health_check": {},
},
},
"cache": {
options: map[string]option{
"success": {},
@ -756,3 +1005,10 @@ var useFirstArgumentOnly = func(o *corefile.Option) (*corefile.Option, error) {
o.Args = o.Args[:1]
return o, nil
}
var proxyRemoveHttpsGoogleProtocol = func(o *corefile.Option) (*corefile.Option, error) {
if len(o.Args) > 0 && o.Args[0] == "https_google" {
return nil, nil
}
return o, nil
}