server

package
v0.0.0-...-8b1022e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnBag

func NewConnBag() *connBag

Types

type Server

type Server struct {
	// Allow is a function that determines whether or not to allow connections
	// from the given IP address. If unspecified, all connections are allowed.
	Allow func(string) bool
	// contains filtered or unexported fields
}

Server is an HTTP proxy server.

func NewServer

func NewServer(handler http.Handler) *Server

NewServer constructs a new HTTP proxy server using the given handler.

func (*Server) AddListenerWrappers

func (s *Server) AddListenerWrappers(listenerGens ...listenerGenerator)

func (*Server) ListenAndServeHTTP

func (s *Server) ListenAndServeHTTP(addr string, readyCb func(addr string)) error

func (*Server) ListenAndServeHTTPS

func (s *Server) ListenAndServeHTTPS(addr, keyfile, certfile string, readyCb func(addr string)) error

func (*Server) Serve

func (s *Server) Serve(listener net.Listener, readyCb func(addr string)) error

Jump to

Keyboard shortcuts

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