http

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServerDefaultTimeOut = 10 * time.Second
	ServerWriteTimeOut   = ServerDefaultTimeOut
	ServerReadTimeOut    = ServerDefaultTimeOut
)

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(logger *slog.Logger, routes ...Route) http.Handler

Types

type Route

type Route struct {
	Pattern string
	Handler http.Handler
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(logger *slog.Logger, handler http.Handler, address string) *Server

func (*Server) Listen

func (s *Server) Listen(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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