httpServer

package
v0.0.0-...-931f6b6 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type HttpTimeout

type HttpTimeout struct {
	AllTimeout int               `yaml:"all_timeout" json:"all_timeout" mapstructure:"all_timeout"` // 总控制的超时时间
	RouteItems []HttpTimeoutItem `yaml:"route_items" json:"route_items" mapstructure:"route_items"` // 特别路由需要独立时间控制 单位s
}

func (*HttpTimeout) Start

func (s *HttpTimeout) Start(e *gin.Engine, logger *fgin.FginSugaredLogger)

func (*HttpTimeout) TimeMiddware

func (s *HttpTimeout) TimeMiddware(ctx *gin.Context)

type HttpTimeoutItem

type HttpTimeoutItem struct {
	Route   string `yaml:"route" json:"route" mapstructure:"route"`       // 需要路由全称
	Timeout int    `yaml:"timeout" json:"timeout" mapstructure:"timeout"` // 单位s
}

Jump to

Keyboard shortcuts

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