server

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServeNetutilServer

func ListenAndServeNetutilServer(ipam IpamInterface, address net.IP, port uint, tlsOptions *TLSOptions)

ListenAndServeNetutilServer initializes a server to respond to HTTP network requests on the ipam interface

Types

type IpamInterface

type IpamInterface interface {
	GetIP() (*net.IPNet, error)
	ReleaseIP(ip *net.IPNet) error
}

IpamInterface contains all the methods required by the server.

type Server

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

Server is a http.Handler which exposes netutils functionality over HTTP.

func NewServer

func NewServer(ipam IpamInterface) *Server

NewServer initializes and configures the netutils_server.Server object to handle HTTP requests.

func (*Server) InstallDefaultHandlers

func (s *Server) InstallDefaultHandlers()

InstallDefaultHandlers registers the default set of supported HTTP request patterns with the mux.

func (*Server) ServeHTTP

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

ServeHTTP responds to HTTP requests

type TLSOptions

type TLSOptions struct {
	Config   *tls.Config
	CertFile string
	KeyFile  string
}

Jump to

Keyboard shortcuts

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