func WriteContainerMetadataResponse(w http.ResponseWriter, containerID string, state dockerstate.TaskEngineState) {
	containerResponse, err := NewContainerResponse(containerID, state)
	if err != nil {
		errResponseJSON, _ := json.Marshal("Unable to generate metadata for container '" + containerID + "'")
		utils.WriteJSONToResponse(w, http.StatusBadRequest, errResponseJSON, utils.RequestTypeContainerMetadata)
		return
	}

	responseJSON, _ := json.Marshal(containerResponse)
	utils.WriteJSONToResponse(w, http.StatusOK, responseJSON, utils.RequestTypeContainerMetadata)
}
func WriteContainerMetadataResponse(w http.ResponseWriter, containerID string, state dockerstate.TaskEngineState) {
	containerResponse, err := NewContainerResponse(containerID, state)
	if err != nil {
		errResponseJSON, _ := json.Marshal("Unable to generate metadata for container '" + containerID + "'")
		utils.WriteJSONToResponse(w, http.StatusBadRequest, errResponseJSON, utils.RequestTypeContainerMetadata)
		return
	}

	responseJSON, _ := json.Marshal(containerResponse)
	utils.WriteJSONToResponse(w, http.StatusOK, responseJSON, utils.RequestTypeContainerMetadata)
}
func WriteContainerMetadataResponse ( w http . ResponseWriter , containerID string , state dockerstate . TaskEngineState ) { containerResponse , err := NewContainerResponse ( containerID , state ) if err != nil { errResponseJSON , _ := json . Marshal ( " " + containerID + " " ) utils . WriteJSONToResponse ( w , http . StatusBadRequest , errResponseJSON , utils . RequestTypeContainerMetadata ) return } responseJSON , _ := json . Marshal ( containerResponse ) utils . WriteJSONToResponse ( w , http . StatusOK , responseJSON , utils . RequestTypeContainerMetadata ) }
// WriteContainerMetadataResponse writes the container metadata to response writer.
WriteContainerMetadataResponse writes the container metadata to response writer .