fix version 1

This commit is contained in:
2026-09-22 21:15:34 +08:00
parent 9f86366638
commit d63d7e8b3a
277 changed files with 9959 additions and 1514 deletions

View File

@@ -0,0 +1,26 @@
package service
import (
"context"
"bsm/full/module/social/relation/internal/server"
gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/grpc"
)
type ExposeOptions struct {
Dependencies
GRPC *grpc.Server
Gateway *gwRuntime.ServeMux
}
// Expose 供聚合宿主接入:注册 gRPC service 与网关路由
func Expose(options ExposeOptions) error {
applyDependencies(options.Dependencies)
server.New(options.GRPC)
if options.Gateway == nil {
return nil
}
return server.RegisterGateway(context.Background(), options.Gateway)
}