httputil

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ctx context.Context, server *http.Server, shutdownTimeout ...time.Duration) error

func RetriableStatus added in v1.2.0

func RetriableStatus(statusCode int) bool

RetriableStatus returns true if the HTTP status code should be retried.

We consider retriable status code:
	* 5xx - all server errors
	* 408 - request timeout
	* 429 - too many requests.

func Serve

func Serve(ctx context.Context, server *http.Server, l net.Listener, shutdownTimeout ...time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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