mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdmain: update v2 proxy ready message
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
72cc355c13
commit
f556b78e8c
@ -549,9 +549,9 @@ func startProxy(cfg *config) error {
|
|||||||
host := u.String()
|
host := u.String()
|
||||||
go func() {
|
go func() {
|
||||||
if lg != nil {
|
if lg != nil {
|
||||||
lg.Info("proxy started listening on client requests", zap.String("host", host))
|
lg.Info("v2 proxy started listening on client requests", zap.String("host", host))
|
||||||
} else {
|
} else {
|
||||||
plog.Info("proxy: listening for client requests on ", host)
|
plog.Infof("v2 proxy started listening on client requests on %q", host)
|
||||||
}
|
}
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
etcdhttp.HandlePrometheus(mux) // v2 proxy just uses the same port
|
etcdhttp.HandlePrometheus(mux) // v2 proxy just uses the same port
|
||||||
|
@ -195,7 +195,7 @@ func startGRPCProxy(cmd *cobra.Command, args []string) {
|
|||||||
grpcl := m.Match(cmux.HTTP2())
|
grpcl := m.Match(cmux.HTTP2())
|
||||||
defer func() {
|
defer func() {
|
||||||
grpcl.Close()
|
grpcl.Close()
|
||||||
lg.Info("stopping listening gRPC proxy client requests", zap.String("address", grpcProxyListenAddr))
|
lg.Info("stop listening gRPC proxy client requests", zap.String("address", grpcProxyListenAddr))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
client := mustNewClient(lg)
|
client := mustNewClient(lg)
|
||||||
@ -211,11 +211,18 @@ func startGRPCProxy(cmd *cobra.Command, args []string) {
|
|||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
etcdhttp.HandlePrometheus(mux)
|
etcdhttp.HandlePrometheus(mux)
|
||||||
grpcproxy.HandleHealth(mux, client)
|
grpcproxy.HandleHealth(mux, client)
|
||||||
|
lg.Info("gRPC proxy server metrics URL serving")
|
||||||
herr := http.Serve(mhttpl, mux)
|
herr := http.Serve(mhttpl, mux)
|
||||||
lg.Fatal("gRPC proxy server serve returned", zap.Error(herr))
|
if herr != nil {
|
||||||
|
lg.Fatal("gRPC proxy server metrics URL returned", zap.Error(herr))
|
||||||
|
} else {
|
||||||
|
lg.Info("gRPC proxy server metrics URL returned")
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lg.Info("started gRPC proxy", zap.String("address", grpcProxyListenAddr))
|
||||||
|
|
||||||
// grpc-proxy is initialized, ready to serve
|
// grpc-proxy is initialized, ready to serve
|
||||||
notifySystemd(lg)
|
notifySystemd(lg)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user