httpserv

package
v0.0.0-...-0558441 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package httpserv contains HTTP server utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WrappedServer

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

WrappedServer is a wrapper around http.Server that provides: - net.Listener allocation and closure - TLS allocation - exit on panic - logging - server header - filtering of invalid requests

func NewWrappedServer

func NewWrappedServer(
	network string,
	address string,
	readTimeout time.Duration,
	serverCert string,
	serverKey string,
	handler http.Handler,
	parent logger.Writer,
) (*WrappedServer, error)

NewWrappedServer allocates a WrappedServer.

func (*WrappedServer) Close

func (s *WrappedServer) Close()

Close closes all resources and waits for all routines to return.

Jump to

Keyboard shortcuts

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