httpsrv

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server provides functionality to start HTTP server with a cancelable context.

func New

func New(log logrus.FieldLogger, addr string, handler http.Handler) *Server

New creates a new HTTP server.

func (*Server) Serve

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

Serve starts the HTTP server and blocks unil the channel is closed or an error occurs.

Jump to

Keyboard shortcuts

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