Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCGatewayServer ¶
type GRPCGatewayServer struct {
// contains filtered or unexported fields
}
GRPCGatewayServer 代表一个 GRPC 网关服务器.
func NewGRPCGatewayServer ¶
func NewGRPCGatewayServer( httpOptions *genericoptions.HTTPOptions, grpcOptions *genericoptions.GRPCOptions, tlsOptions *genericoptions.TLSOptions, registerHandler func(mux *runtime.ServeMux, conn *grpc.ClientConn) error, ) (*GRPCGatewayServer, error)
NewGRPCGatewayServer 创建一个新的 GRPC 网关服务器实例.
func (*GRPCGatewayServer) GracefulStop ¶
func (s *GRPCGatewayServer) GracefulStop(ctx context.Context)
GracefulStop 优雅地关闭 GRPC 网关服务器.
func (*GRPCGatewayServer) RunOrDie ¶
func (s *GRPCGatewayServer) RunOrDie()
RunOrDie 启动 GRPC 网关服务器并在出错时记录致命错误.
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
GRPCServer 代表一个 GRPC 服务器.
func NewGRPCServer ¶
func NewGRPCServer( grpcOptions *genericoptions.GRPCOptions, tlsOptions *genericoptions.TLSOptions, serverOptions []grpc.ServerOption, registerServer func(grpc.ServiceRegistrar), ) (*GRPCServer, error)
NewGRPCServer 创建一个新的 GRPC 服务器实例.
func (*GRPCServer) GracefulStop ¶
func (s *GRPCServer) GracefulStop(ctx context.Context)
GracefulStop 优雅地关闭 GRPC 服务器.
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer 代表一个 HTTP 服务器.
func NewHTTPServer ¶
func NewHTTPServer(httpOptions *genericoptions.HTTPOptions, tlsOptions *genericoptions.TLSOptions, handler http.Handler) *HTTPServer
NewHTTPServer 创建一个新的 HTTP 服务器实例.
func (*HTTPServer) GracefulStop ¶
func (s *HTTPServer) GracefulStop(ctx context.Context)
GracefulStop 优雅地关闭 HTTP 服务器.
Click to show internal directories.
Click to hide internal directories.