25 lines
542 B
Go
25 lines
542 B
Go
package app
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func handleTransportClientAction(w http.ResponseWriter, r *http.Request, id, action string) {
|
|
if handleTransportVirtualClientAction(w, r, id, action) {
|
|
return
|
|
}
|
|
|
|
switch action {
|
|
case "health":
|
|
handleTransportClientHealthAction(w, r, id)
|
|
case "metrics":
|
|
handleTransportClientMetricsAction(w, r, id)
|
|
case "provision":
|
|
handleTransportClientProvisionAction(w, r, id)
|
|
case "start", "stop", "restart":
|
|
handleTransportClientLifecycleAction(w, r, id, action)
|
|
default:
|
|
http.NotFound(w, r)
|
|
}
|
|
}
|