httpsvr

package
v0.1.73 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TCP

func TCP(addr string, handler http.Handler) error

TCP runs an HTTP server on TCP network listener.

func TLS

func TLS(addr string, handler http.Handler, certFile, keyFile string) error

TLS runs an HTTP server on TCP network listener and handle requests on incoming TLS connections.

func Unix

func Unix(unix string, handler http.Handler) error

Unix runs an HTTP server on Unix domain socket listener.

func UnixTLS

func UnixTLS(unix string, handler http.Handler, certFile, keyFile string) error

UnixTLS runs an HTTP server on Unix domain socket listener and handle requests on incoming TLS connections.

Types

type Server

type Server struct {
	*http.Server
	*log.Logger
	Unix string
	Host string
	Port string
	// contains filtered or unexported fields
}

Server defines parameters for running an HTTP server.

func New

func New() *Server

New creates an HTTP server.

func (*Server) ReadCount

func (s *Server) ReadCount() int64

func (*Server) Run

func (s *Server) Run() error

Run runs an HTTP server which can be gracefully shut down.

func (*Server) RunTLS

func (s *Server) RunTLS(certFile, keyFile string) error

func (*Server) SetLogger

func (s *Server) SetLogger(logger *log.Logger)

func (*Server) SetReload

func (s *Server) SetReload(d time.Duration)

func (*Server) WriteCount

func (s *Server) WriteCount() int64

Jump to

Keyboard shortcuts

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