add close
This commit is contained in:
@@ -14,6 +14,8 @@ type GrpcService struct {
|
||||
}
|
||||
|
||||
func ServeGrpc() error {
|
||||
defer container.Close()
|
||||
|
||||
return container.Container.Invoke(func(grpc GrpcService) error {
|
||||
for _, svc := range grpc.Services {
|
||||
grpc.Server.RegisterService(svc.Name(), svc.Register)
|
||||
|
||||
@@ -14,6 +14,8 @@ type Http struct {
|
||||
}
|
||||
|
||||
func ServeHttp() error {
|
||||
defer container.Close()
|
||||
|
||||
return container.Container.Invoke(func(http Http) error {
|
||||
for _, route := range http.Routes {
|
||||
route.Register()
|
||||
|
||||
Reference in New Issue
Block a user