Documentation
¶
Index ¶
- type HttpServer
- type HttpServerOption
- func WithAddr(addr string) HttpServerOption
- func WithAppName(name string) HttpServerOption
- func WithDebug(debug bool) HttpServerOption
- func WithLogger(logger *zap.Logger) HttpServerOption
- func WithTLS(certFile, keyFile string) HttpServerOption
- func WithTLSConfig(tlsConfig *tls.Config) HttpServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(ctx context.Context, opts ...HttpServerOption) (*HttpServer, error)
func (*HttpServer) Context ¶
func (s *HttpServer) Context() context.Context
func (*HttpServer) Engine ¶
func (s *HttpServer) Engine() *gin.Engine
func (*HttpServer) Logger ¶
func (s *HttpServer) Logger() *zap.Logger
func (*HttpServer) Start ¶
func (s *HttpServer) Start()
func (*HttpServer) Stop ¶
func (s *HttpServer) Stop()
type HttpServerOption ¶
type HttpServerOption interface {
// contains filtered or unexported methods
}
func WithAddr ¶
func WithAddr(addr string) HttpServerOption
func WithAppName ¶
func WithAppName(name string) HttpServerOption
func WithDebug ¶
func WithDebug(debug bool) HttpServerOption
func WithLogger ¶
func WithLogger(logger *zap.Logger) HttpServerOption
func WithTLS ¶
func WithTLS(certFile, keyFile string) HttpServerOption
func WithTLSConfig ¶
func WithTLSConfig(tlsConfig *tls.Config) HttpServerOption
Click to show internal directories.
Click to hide internal directories.