# Functions
开启一个网关服务 go gateway.Run(
ctx,
gateway.WithAddr(":8888"),
gateway.WithGRPCServer("tcp", ":5001"),
gateway.WithSwaggerDir("/swagger"),
gateway.WithHandle(pb.RegisterRbacServiceHandler),
)
*/ Run starts a HTTP server and blocks while running if successful.// The server will be shutdown when "ctx" is canceled.
设置监听地址.
设置grpc服务地址.
设置Handles.
设置mux.
设置swagger目录.
# Constants
默认地址.
默认grpc地址.
默认grpc.
参考:https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/gateway.
# Type aliases
网关参数设置.