Add per-route details to status, move socket to /srv/mc-proxy/
mcproxyctl status now shows individual routes per listener with hostname, backend, mode, and re-encrypt indicator. Proto, gRPC server, client library, and CLI all updated. Default gRPC socket path moved from /var/run/mc-proxy.sock to /srv/mc-proxy/mc-proxy.sock to match the service data directory convention. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"git.wntrmute.dev/kyle/mc-proxy/client/mcproxy"
|
||||
)
|
||||
|
||||
const defaultSocketPath = "/var/run/mc-proxy.sock"
|
||||
const defaultSocketPath = "/srv/mc-proxy/mc-proxy.sock"
|
||||
|
||||
type contextKey string
|
||||
|
||||
|
||||
@@ -34,6 +34,17 @@ func statusCmd() *cobra.Command {
|
||||
|
||||
for _, ls := range status.Listeners {
|
||||
fmt.Printf(" %s routes=%d active=%d\n", ls.Addr, ls.RouteCount, ls.ActiveConnections)
|
||||
for _, r := range ls.Routes {
|
||||
mode := r.Mode
|
||||
if mode == "" {
|
||||
mode = "l4"
|
||||
}
|
||||
extra := ""
|
||||
if r.BackendTLS {
|
||||
extra = " (re-encrypt)"
|
||||
}
|
||||
fmt.Printf(" %s %s → %s%s\n", mode, r.Hostname, r.Backend, extra)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user