server

package
v0.0.0-...-058fe0e Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 26 Imported by: ? 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 EncodeResponse

func EncodeResponse(rw http.ResponseWriter, statusCode int, data interface{}) error

EncodeResponse encodes response in json.

func HandleErrorResponse

func HandleErrorResponse(w http.ResponseWriter, err error)

HandleErrorResponse handles err from daemon side and constructs response for client side.

Types

type Server

type Server struct {
	Config       config.Config
	ContainerMgr mgr.ContainerMgr
	SystemMgr    mgr.SystemMgr
	ImageMgr     mgr.ImageMgr
	VolumeMgr    mgr.VolumeMgr
	NetworkMgr   mgr.NetworkMgr
	// contains filtered or unexported fields
}

Server is a http server which serves restful api to client.

func (*Server) Start

func (s *Server) Start() (err error)

Start setup route table and listen to specified address which currently only supports unix socket and tcp address.

func (*Server) Stop

func (s *Server) Stop() error

Stop will shutdown http server by closing all listeners.

Jump to

Keyboard shortcuts

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