timeout

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: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcRemainTimeout

func CalcRemainTimeout(ctx context.Context) (int64, error)

CalcRemainTimeout is used to calculate remain timeout

func SetHeader

func SetHeader(ctx context.Context, header http.Header) (err error)

SetHeader save timeout field to http.Header

func SetStart

func SetStart(ctx context.Context, timeout int64) context.Context

SetStart for marking current service request start

func TimeoutMiddleware

func TimeoutMiddleware(timeout time.Duration) func(c *gin.Context)

TimeoutMiddleware is used to pass the remaining timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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