http

package
v0.0.0-...-2595b88 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 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 Option

type Option func(*Server)

An Option is options func that can be set up when creating a new server.

func Routers

func Routers(routers ...Router) Option

Routers registers routers.

type Router

type Router func(*mux.Router)

Router route the service using github.com/gorilla/mux.

type Server

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

Server is an HTTP test server.

func NewServer

func NewServer(addr string, options ...Option) *Server

NewServer returns a test server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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