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:
@@ -434,12 +434,23 @@ func (a *AdminServer) GetStatus(_ context.Context, _ *pb.GetStatusRequest) (*pb.
|
||||
var listeners []*pb.ListenerStatus
|
||||
for _, ls := range a.srv.Listeners() {
|
||||
routes := ls.Routes()
|
||||
var pbRoutes []*pb.Route
|
||||
for hostname, route := range routes {
|
||||
pbRoutes = append(pbRoutes, &pb.Route{
|
||||
Hostname: hostname,
|
||||
Backend: route.Backend,
|
||||
Mode: route.Mode,
|
||||
BackendTls: route.BackendTLS,
|
||||
SendProxyProtocol: route.SendProxyProtocol,
|
||||
})
|
||||
}
|
||||
listeners = append(listeners, &pb.ListenerStatus{
|
||||
Addr: ls.Addr,
|
||||
RouteCount: int32(len(routes)),
|
||||
ActiveConnections: ls.ActiveConnections.Load(),
|
||||
ProxyProtocol: ls.ProxyProtocol,
|
||||
MaxConnections: ls.MaxConnections,
|
||||
Routes: pbRoutes,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user