Documentation
¶
Index ¶
Constants ¶
View Source
const ( HTTPTimeoutReadDefault = 10 HTTPTimeoutWriteDefault = 10 )
Variables ¶
View Source
var ErrGrpcExecPanic = errors.New("grpc exec panic")
Functions ¶
func AddGracefulStop ¶
func AddGracefulStop(fn func())
func GinLoggerHandler ¶
func GinLoggerHandler() gin.HandlerFunc
func GinRecoverHandler ¶
func GinRecoverHandler() gin.HandlerFunc
Types ¶
type GrpcConfig ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
func NewGrpcServer ¶
func NewGrpcServer(conf GrpcConfig, registerServerFunc func(*grpc.Server), interceptors ...grpc.UnaryServerInterceptor) (*GrpcServer, error)
func (*GrpcServer) Start ¶
func (s *GrpcServer) Start()
func (*GrpcServer) Stop ¶
func (s *GrpcServer) Stop()
type HTTPConfig ¶
type HTTPService ¶
type HTTPService struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(conf HTTPConfig, handler http.Handler) (*HTTPService, error)
func (*HTTPService) Start ¶
func (s *HTTPService) Start()
func (*HTTPService) Stop ¶
func (s *HTTPService) Stop()
Click to show internal directories.
Click to hide internal directories.