webserver

package
v0.0.0-...-10d000d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2013 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerPicker

type HandlerPicker func(req *http.Request) (http.HandlerFunc, bool)

type Server

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

func New

func New() *Server

func (*Server) Handle

func (s *Server) Handle(pattern string, handler http.Handler)

func (*Server) HandleFunc

func (s *Server) HandleFunc(pattern string, fn func(http.ResponseWriter, *http.Request))

func (*Server) Listen

func (s *Server) Listen(addr string) error

Listen starts listening on the given host:port addr.

func (*Server) ListenURL

func (s *Server) ListenURL() string

func (*Server) RegisterPreMux

func (s *Server) RegisterPreMux(hp HandlerPicker)

Register conditional handler-picker functions which get run before HandleFunc or Handle. The HandlerPicker should return false if it's not interested in a request.

func (*Server) Serve

func (s *Server) Serve()

func (*Server) ServeHTTP

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

func (*Server) SetTLS

func (s *Server) SetTLS(certFile, keyFile string)

Jump to

Keyboard shortcuts

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