server

package
v1.4.2-0...-d12a2d8 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2015 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptConnections

func AcceptConnections()

func NewTcpSocket

func NewTcpSocket(addr string, config *tlsConfig) (net.Listener, error)

func NewUnixSocket

func NewUnixSocket(path, group string) (net.Listener, error)

func ProfilerSetup

func ProfilerSetup(mainRouter *mux.Router, path string)

func ServeApi

func ServeApi(protoAddrs []string, conf *ServerConfig, eng *engine.Engine) error

ServeApi loops through all of the protocols sent in to docker and spawns off a go routine to setup a serving http.Server for each.

func ServeRequest

func ServeRequest(eng *engine.Engine, apiversion version.Version, w http.ResponseWriter, req *http.Request)

ServeRequest processes a single http request to the docker remote api. FIXME: refactor this to be part of Server and not require re-creating a new router each time. This requires first moving ListenAndServe into Server.

Types

type HttpApiFunc

type HttpApiFunc func(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error

type HttpServer

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

func (*HttpServer) Close

func (s *HttpServer) Close() error

func (*HttpServer) Serve

func (s *HttpServer) Serve() error

type Server

type Server interface {
	Serve() error
	Close() error
}

func NewServer

func NewServer(proto, addr string, conf *ServerConfig, eng *engine.Engine) (Server, error)

NewServer sets up the required Server and does protocol specific checking.

type ServerConfig

type ServerConfig struct {
	Logging     bool
	EnableCors  bool
	CorsHeaders string
	Version     string
	SocketGroup string
	Tls         bool
	TlsVerify   bool
	TlsCa       string
	TlsCert     string
	TlsKey      string
}

Jump to

Keyboard shortcuts

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