http

package
v0.0.0-...-3a7b102 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request) error

type Middleware

type Middleware func(next HandlerFunc) HandlerFunc

type Server

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

func NewServer

func NewServer(logger log.Logger, opts ...ServerOption) *Server

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(address string) error

func (*Server) Serve

func (s *Server) Serve(listener net.Listener) error

func (*Server) Shutdown

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

func (*Server) Upgrade

func (s *Server) Upgrade(handler http.Handler)

type ServerOption

type ServerOption func(*Server)

func WithServer

func WithServer(server *http.Server) ServerOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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