http

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultReadTimeout = 5 * time.Second
View Source
const GracefulShutdownTimeout = 5 * time.Second

Variables

This section is empty.

Functions

func NewServer

func NewServer(addr string, port int, opts ...Option) *http.Server

func RunServer

func RunServer(ctx context.Context, srv *http.Server) error

Types

type Option

type Option func(*http.Server)

func WithMux

func WithMux(mux *http.ServeMux) Option

func WithReadTimeout

func WithReadTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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