feat: implement global support for setting proxy type

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-19 04:13:55 -05:00
parent ea28367689
commit 7fbb86093b
6 changed files with 73 additions and 8 deletions

View File

@@ -11,8 +11,10 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
}
flags := map[string]common.ReportFunc{
"--proxy-enabled": reportEnabled,
"--proxy-type": reportType,
"--proxy-enabled": reportEnabled,
"--proxy-computed-type": reportComputedType,
"--proxy-global-type": reportGlobalType,
"--proxy-type": reportType,
}
flagKeys := []string{}
@@ -35,6 +37,19 @@ func reportEnabled(appName string) string {
return proxyEnabled
}
func reportComputedType(appName string) string {
proxyType := getGlobalProxyType()
if proxyType == "" {
proxyType = getAppProxyType(appName)
}
return proxyType
}
func reportGlobalType(appName string) string {
return getGlobalProxyType()
}
func reportType(appName string) string {
return getAppProxyType(appName)
}