-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: if no serve to run then exit * Update go.yml * feat: if no services to run, log warn info * feat: add runGroup count * feat: add info log for no service to apply * feat: add grpc healthcheck * test: if ETCD_ADDR is empty, then skip test * feat: srvgrpc add metrics module * fix: default grpcServe add Interceptor * feat: add debug info when serve run * fix: delete notes * test: use env value * test: not need to manually disable * test: replace Skipf to Skip * fix: merge master conflict * fix: remove applies count check * test: remove TestC_NoServe * test: revoke 9539448 for e13c343 Co-authored-by: 谷溪 <guxi99@gmail.com>
- Loading branch information
Showing
11 changed files
with
211 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package srvgrpc | ||
|
||
import ( | ||
"google.golang.org/grpc" | ||
"google.golang.org/grpc/health" | ||
healthpb "google.golang.org/grpc/health/grpc_health_v1" | ||
) | ||
|
||
// HealthCheckModule defines a grpc provider for container.Container. | ||
type HealthCheckModule struct{} | ||
|
||
// ProvideGRPC implements container.GRPCProvider | ||
func (h HealthCheckModule) ProvideGRPC(server *grpc.Server) { | ||
srv := health.NewServer() | ||
srv.SetServingStatus("", healthpb.HealthCheckResponse_SERVING) | ||
healthpb.RegisterHealthServer(server, srv) | ||
} |
Oops, something went wrong.