feat: implement global support for setting proxy type
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user