package server

import "github.com/docker/docker/api/server"

Index

Types

type Addr

type Addr struct {
	Proto string
	Addr  string
}

Addr contains string representation of address and its protocol (tcp, unix...).

type Config

type Config struct {
	Logging                  bool
	EnableCors               bool
	CorsHeaders              string
	AuthorizationPluginNames []string
	Version                  string
	SocketGroup              string
	TLSConfig                *tls.Config
	Addrs                    []Addr
}

Config provides the configuration for the API server

type HTTPServer

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

HTTPServer contains an instance of http server and the listener. srv *http.Server, contains configuration to create a http server and a mux router with all api end points. l net.Listener, is a TCP or Socket listener that dispatches incoming request to the router.

func (*HTTPServer) Close

func (s *HTTPServer) Close() error

Close closes the HTTPServer from listening for the inbound requests.

func (*HTTPServer) Serve

func (s *HTTPServer) Serve() error

Serve starts listening for inbound requests.

type Server

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

Server contains instance details for the server

func New

func New(cfg *Config) (*Server, error)

New returns a new instance of the server based on the specified configuration. It allocates resources which will be needed for ServeAPI(ports, unix-sockets).

func (*Server) Close

func (s *Server) Close()

Close closes servers and thus stop receiving requests

func (*Server) InitRouters

func (s *Server) InitRouters(d *daemon.Daemon)

InitRouters initializes a list of routers for the server.

func (*Server) Reload

func (s *Server) Reload(config *daemon.Config)

Reload reads configuration changes and modifies the server according to those changes. Currently, only the --debug configuration is taken into account.

func (*Server) Wait

func (s *Server) Wait(waitChan chan error)

Wait blocks the server goroutine until it exits. It sends an error message if there is any error during the API execution.

Source Files

middleware.go profiler.go router_swapper.go server.go

Directories

PathSynopsis
api/server/httputils
api/server/router
api/server/router/build
api/server/router/container
api/server/router/local
api/server/router/network
api/server/router/system
api/server/router/volume
Version
v1.10.0-rc1
Published
Jan 15, 2016
Platform
js/wasm
Imports
32 packages
Last checked
2 minutes ago

Tools for package owners.