Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRequesrID ¶
AddRequesrID 给每个请求加上 request id
Types ¶
type GatewayOptions ¶
type GatewayOptions struct { // 存放生成的 Swager json 文件的目录 SwaggerJSONDir string // Swagger UI 前段文件目录 SwaggerUIDir string // Grpc server address GrpcServerAddr string }
func (GatewayOptions) IsValid ¶
func (v GatewayOptions) IsValid() error
type GatewayServer ¶
type GatewayServer struct {
// contains filtered or unexported fields
}
GatewayServer is the gateway server for the grpc server.
func NewGatewayServer ¶
func NewGatewayServer(opts *GatewayOptions) (*GatewayServer, error)
NewGatewayServer creates a new GatewayServer.
type MiddlewareChain ¶
type MiddlewareChain struct {
MiddlewareInterceptors []MiddlewareInterceptor
}
MiddlewareChain is a collection of interceptors that will be invoked in there index order
func NewMiddlewareChain ¶
func NewMiddlewareChain(ms ...MiddlewareInterceptor) MiddlewareChain
NewMiddlewareChain 创建一个新的 middlewareChain
func (MiddlewareChain) Handler ¶
func (p MiddlewareChain) Handler(ms ...MiddlewareInterceptor) MiddlewareChain
Handler allows hooking multiple MiddlewareInterceptor in single call.
Click to show internal directories.
Click to hide internal directories.