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
}
func NewGRPCGatewayServer ¶
func NewGRPCGatewayServer( httpOptions *genericoptions.HTTPOptions, grpcOptions *genericoptions.GRPCOptions, tlsOptions *genericoptions.TLSOptions, registerHandler func(mux *runtime.ServeMux, conn *grpc.ClientConn) error, ) (*GRPCGatewayServer, error)
func (*GRPCGatewayServer) GracefulStop ¶
func (h *GRPCGatewayServer) GracefulStop(ctx context.Context)
func (*GRPCGatewayServer) RunOrDie ¶
func (h *GRPCGatewayServer) RunOrDie()
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
GRPCServer defines the gRPC server
func NewGRPCServer ¶
func NewGRPCServer( grpcOptions *genericoptions.GRPCOptions, tlsOptions *genericoptions.TLSOptions, serverOptions []grpc.ServerOption, registerServer func(grpc.ServiceRegistrar), ) (*GRPCServer, error)
func (*GRPCServer) GracefulStop ¶
func (s *GRPCServer) GracefulStop(ctx context.Context)
func (*GRPCServer) RunOrDie ¶
func (s *GRPCServer) RunOrDie()
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer( httpOptions *genericoptions.HTTPOptions, tlsOptions *genericoptions.TLSOptions, handler http.Handler, ) *HTTPServer
func (*HTTPServer) GracefulStop ¶
func (h *HTTPServer) GracefulStop(ctx context.Context)
func (*HTTPServer) RunOrDie ¶
func (h *HTTPServer) RunOrDie()
type Server ¶
type Server interface { // RunOrDie runs the server. If it fails to run, it will exit the program (the meaning of OrDie). RunOrDie() // The GracefulStop method is used to gracefully shut down the server. When shutting down the server, the timeout of the context needs to be handled. GracefulStop(ctx context.Context) }
Server defines the server interface
Click to show internal directories.
Click to hide internal directories.