http

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 7 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 {
	*http.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts ...ServerOption) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(resp http.ResponseWriter, req *http.Request)

ServeHTTP should write reply headers and data to the ResponseWriter and then return.

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

type ServerOption

type ServerOption func(*Server)

ServerOption is HTTP server option

func Address

func Address(addr string) ServerOption

Address with server address.

func Network

func Network(network string) ServerOption

Network with server network.

func Timeout

func Timeout(timeout time.Duration) ServerOption

Timeout with server timeout.

Jump to

Keyboard shortcuts

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