feat user服部署

This commit is contained in:
2025-12-20 21:00:24 +08:00
parent ff1bd1d0b6
commit 69cc960fe5
14 changed files with 83 additions and 28 deletions

View File

@@ -19,16 +19,16 @@ db:
serve:
grpc:
address: "127.0.0.1"
address: "10.0.40.199"
port: 8500
ttl: 20
socket:
web:
address: "127.0.0.1"
address: "0.0.0.0"
port: 8501
raw:
address: "127.0.0.1"
address: "0.0.0.0"
port: 8502
http:
address: "127.0.0.1"
address: "0.0.0.0"
port: 8503

View File

@@ -24,11 +24,11 @@ serve:
ttl: 20
socket:
web:
address: "127.0.0.1"
address: "0.0.0.0"
port: 8501
raw:
address: "127.0.0.1"
address: "0.0.0.0"
port: 8502
http:
address: "127.0.0.1"
address: "0.0.0.0"
port: 8503

View File

@@ -33,7 +33,7 @@ func ErrorHandler(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w
code = http_resp.Failed.Code()
msg = http_resp.Failed.Error()
}
if st.Code() == codes.Unknown {
if st.Code() == codes.Unknown || st.Code() == codes.Unimplemented {
msg = st.Message()
}
@@ -47,6 +47,8 @@ func grpcCodeToHTTPCode(c codes.Code) int {
switch c {
case codes.OK, codes.Unknown:
return http.StatusOK
case codes.Unimplemented:
return http.StatusNotFound
default:
return http.StatusInternalServerError
}