http

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 10 Imported by: 2

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

func WithDebug(isDebug bool) Option

func WithMetrics added in v1.0.5

func WithMetrics(uri string) Option

func WithMiddleware

func WithMiddleware(middleware ...gin.HandlerFunc) Option

func WithOnShutDown

func WithOnShutDown(onShutdown []func()) Option

func WithPprof

func WithPprof(pprofTurn bool) Option

func WithReadTimeout

func WithReadTimeout(timeout time.Duration) 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, router RegisterRouter, 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