go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.
MIT License
Bot releases are hidden (Show)
Published by wubin1989 over 2 years ago
rootPath
field to go client struct for configuring path prefix when sending http requestsNacosRRServiceProvider
and NacosWRRServiceProvider
for supporting load balancing of services fetched from Nacos serverGDD_ROUTE_ROOT_PATH
is setPublished by wubin1989 over 2 years ago
Published by wubin1989 over 2 years ago
required
validation featureBizError
struct for passing error message, business error code and http status code from service implementation layer to http handler layerGDD_MEM_LOG_DISABLE
environment variable to disable memberlist log, default is falsePublished by wubin1989 over 2 years ago
--pre
flag to go-doudou svc push
subcommand to let developer add prefix string to docker image name.GET /go-doudou/config
to display all environment variable pairs in browser.go-doudou version
commandPublished by wubin1989 over 2 years ago
mlist.Leave
from registry.Shutdown
method because calling leave
method will send a left message to remote peers and make its state to be StateLeft
. A node won't gossip messages to StateLeft
nodes any more. If left a cluster incorrectly by calling leave
method, the node won't have any chance to refute suspect or dead message to let remote peers know it still alive (or become alive again).// Leave leaves the cluster on purpose
func Leave(timeout time.Duration) {
if mlist != nil {
_ = mlist.Leave(timeout)
logger.Info("local node left the cluster")
}
}
Published by wubin1989 almost 3 years ago
Published by wubin1989 almost 3 years ago
Published by wubin1989 almost 3 years ago
Improved log feature for supporting ELK stack better
Published by wubin1989 almost 3 years ago
Published by wubin1989 almost 3 years ago
Published by wubin1989 almost 3 years ago
Add http.MethodOptions to support cors
Published by wubin1989 almost 3 years ago
Properly Handle no such host error from memberlist
Published by wubin1989 almost 3 years ago
srv.AddMiddleware(ddhttp.Tracing, ddhttp.Metrics, requestid.RequestIDHandler, handlers.CompressHandler, handlers.ProxyHeaders, ddhttp.Logger, ddhttp.Rest, ddhttp.Recover)
DEBU[2021-12-30 12:17:03] {
"clientIp": "[::1]:53489",
"httpMethod": "POST",
"uri": "/upload/avatar",
"proto": "HTTP/1.1",
"host": "localhost:6061",
"reqContentLength": 199769,
"reqHeader": {
"Accept": [
"*/*"
],
"Cache-Control": [
"no-cache"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"199769"
],
"Content-Type": [
"multipart/form-data; boundary=--------------------------631217490048140198896124"
],
"User-Agent": [
"PostmanRuntime/7.28.3"
],
"X-Request-Id": [
"5d1816f2-439e-412d-aa65-fd963baa5863"
]
},
"requestId": "5d1816f2-439e-412d-aa65-fd963baa5863",
"rawReq": "ps=laborum",
"respBody": "{\"ri\":0,\"rs\":\"OK\"}\n",
"statusCode": 200,
"respHeader": {
"Content-Type": [
"application/json; charset=UTF-8"
]
},
"respContentLength": 19,
"elapsedTime": "3.89µs",
"span": "33238964ec22e157:33238964ec22e157:0000000000000000:1"
}
Published by wubin1989 almost 3 years ago
Published by wubin1989 almost 3 years ago
Add Jaeger support
Published by wubin1989 almost 3 years ago
Add Close method to v3.FileModel struct for releasing the resouce
Published by wubin1989 almost 3 years ago
Add client side retry feature. If one node cannot process requests, retry another node.
Published by wubin1989 almost 3 years ago
Filter suspect nodes when send http requests in elegant way
Published by wubin1989 almost 3 years ago
Add smooth weighted round-robin load balancing feature. If environment variable GDD_MEM_WEIGHT is not set, local node weight will be calculated by health score and cpu idle percent every GDD_MEM_WEIGHT_INTERVAL and gossip to remote nodes.
Published by wubin1989 almost 3 years ago