http

package
v1.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(s *Server)

func WithDebug added in v1.0.20

func WithDebug(isDebug bool) Option

func WithMiddlewares

func WithMiddlewares(middlewares ...gin.HandlerFunc) Option

func WithOnShutDown added in v1.0.20

func WithOnShutDown(onShutdown []func()) Option

func WithPprof

func WithPprof(pprofTurn bool) Option

func WithReadTimeout

func WithReadTimeout(timeout time.Duration) Option

func WithRegisterRouter

func WithRegisterRouter(r RegisterRouter) Option

func WithWriteTimeout

func WithWriteTimeout(timeout time.Duration) Option

type RegisterRouter

type RegisterRouter func(server *gin.Engine)

type Server

type Server struct {
	*http.Server
	// contains filtered or unexported fields
}

func New

func New(addr string, opts ...Option) *Server

func (*Server) Close

func (s *Server) Close() (err error)

func (*Server) Start

func (s *Server) Start() (err error)

Directories

Path Synopsis
middleware
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL