Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NetworkModeAWSVPC specifies the AWS VPC network mode. NetworkModeAWSVPC = "awsvpc" // RequestTypeCreds specifies the request type of CredentialsHandler. RequestTypeCreds = "credentials" // RequestTypeTaskMetadata specifies the task metadata request type of TaskContainerMetadataHandler. RequestTypeTaskMetadata = "task metadata" // RequestTypeContainerMetadata specifies the container metadata request type of TaskContainerMetadataHandler. RequestTypeContainerMetadata = "container metadata" // RequestTypeTaskStats specifies the task stats request type of StatsHandler. RequestTypeTaskStats = "task stats" // RequestTypeContainerStats specifies the container stats request type of StatsHandler. RequestTypeContainerStats = "container stats" // RequestTypeAgentMetadata specifies the Agent metadata request type of AgentMetadataHandler. RequestTypeAgentMetadata = "agent metadata" )
Variables ¶
This section is empty.
Functions ¶
func ValueFromRequest ¶
ValueFromRequest returns the value of a field in the http request. The boolean value is set to true if the field exists in the query.
func WriteJSONToResponse ¶
func WriteJSONToResponse(w http.ResponseWriter, httpStatusCode int, responseJSON []byte, requestType string)
WriteJSONToResponse writes the header, JSON response to a ResponseWriter, and log the error if necessary.
Types ¶
type DockerStateResolver ¶
type DockerStateResolver interface {
State() dockerstate.TaskEngineState
}
DockerStateResolver is a sub-interface for the engine.TaskEngine interface to make it easy to test code in this package
type ErrorMessage ¶
type ErrorMessage struct { Code string `json:"code"` Message string `json:"message"` HTTPErrorCode int }
ErrorMessage is used to store the human-readable error Code and a descriptive Message that describes the error. This struct is marshalled and returned in the HTTP response.
Click to show internal directories.
Click to hide internal directories.