optz.
This commit is contained in:
@@ -3,6 +3,7 @@ package service
|
||||
import (
|
||||
"context"
|
||||
|
||||
"bsm/full/module/finance/wallet/internal/config"
|
||||
"bsm/full/module/finance/wallet/internal/server"
|
||||
pb "bsm/full/module/finance/wallet/pb"
|
||||
gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
@@ -12,9 +13,15 @@ import (
|
||||
type ExposeOptions struct {
|
||||
GRPC *grpc.Server
|
||||
Gateway *gwRuntime.ServeMux
|
||||
Config *Config
|
||||
}
|
||||
|
||||
type Config = config.SrvConfig
|
||||
|
||||
func Expose(options ExposeOptions) error {
|
||||
if options.Config != nil {
|
||||
config.Spec = *options.Config
|
||||
}
|
||||
server.New(options.GRPC)
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
Reference in New Issue
Block a user