This change makes interacting with port mappings more clear - folks might previously set the port mapping to the proxy type or vice-versa. The existing proxy:ports* commands still exist but will show a deprecation warning for a single minor release.
25 lines
479 B
Go
25 lines
479 B
Go
package proxy
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// TriggerProxyIsEnabled prints true or false depending on whether the proxy is enabled
|
|
func TriggerProxyIsEnabled(appName string) error {
|
|
if IsAppProxyEnabled(appName) {
|
|
fmt.Println("true")
|
|
} else {
|
|
fmt.Println("false")
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// TriggerProxyType prints out the current proxy type, defaulting to nginx
|
|
func TriggerProxyType(appName string) error {
|
|
proxyType := getAppProxyType(appName)
|
|
fmt.Println(proxyType)
|
|
|
|
return nil
|
|
}
|