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.
func SetupManagerWhitelist ¶
func SetupManagerWhitelist(server *Server)
SetupManagerWhitelist enables users to setup which common name can access this server
Types ¶
type Server ¶
type Server struct { Config *config.Config ContainerMgr mgr.ContainerMgr SystemMgr mgr.SystemMgr ImageMgr mgr.ImageMgr VolumeMgr mgr.VolumeMgr NetworkMgr mgr.NetworkMgr StreamRouter stream.Router ContainerPlugin hookplugins.ContainerPlugin APIPlugin hookplugins.APIPlugin ManagerWhiteList map[string]struct{} FlyingReq int32 // contains filtered or unexported fields }
Server is a http server which serves restful api to client.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.