server

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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