Documentation ¶
Index ¶
- Constants
- Variables
- func NewContainerResponse(dockerContainer *apicontainer.DockerContainer, eni *ni.NetworkInterface, ...) tmdsv2.ContainerResponse
- func NewContainerResponseFromState(containerID string, state dockerstate.TaskEngineState, includeV4Metadata bool) (*tmdsv2.ContainerResponse, error)
- func NewTaskResponse(taskARN string, state dockerstate.TaskEngineState, ecsClient ecs.ECSClient, ...) (*tmdsv2.TaskResponse, error)
- func NewTaskStatsResponse(taskARN string, state dockerstate.TaskEngineState, statsEngine stats.Engine) (map[string]*types.StatsJSON, error)
- func TaskContainerMetadataHandler(state dockerstate.TaskEngineState, ecsClient ecs.ECSClient, ...) func(http.ResponseWriter, *http.Request)
- func TaskContainerStatsHandler(state dockerstate.TaskEngineState, statsEngine stats.Engine) func(http.ResponseWriter, *http.Request)
- func WriteContainerMetadataResponse(w http.ResponseWriter, containerID string, state dockerstate.TaskEngineState)
- func WriteContainerStatsResponse(w http.ResponseWriter, taskARN string, containerID string, ...)
- func WriteTaskMetadataResponse(w http.ResponseWriter, taskARN string, cluster string, ...)
- func WriteTaskStatsResponse(w http.ResponseWriter, taskARN string, state dockerstate.TaskEngineState, ...)
Constants ¶
const ( // TaskMetadataPath specifies the relative URI path for serving task metadata. TaskMetadataPath = "/v2/metadata" // TaskWithTagsMetadataPath specifies the relative URI path for serving task metadata with Container Instance and Task Tags. TaskWithTagsMetadataPath = "/v2/metadataWithTags" // TaskMetadataPathWithSlash specifies the relative URI path for serving task metadata. TaskMetadataPathWithSlash = TaskMetadataPath + "/" // TaskWithTagsMetadataPath specifies the relative URI path for serving task metadata with Container Instance and Task Tags. TaskWithTagsMetadataPathWithSlash = TaskWithTagsMetadataPath + "/" )
const ( // TaskStatsPath specifies the relative URI path for serving task stats. TaskStatsPath = "/v2/stats" // TaskStatsPathWithSlash specifies the relative URI path for serving task stats. TaskStatsPathWithSlash = TaskStatsPath + "/" )
Variables ¶
var ContainerMetadataPath = TaskMetadataPathWithSlash + utils.ConstructMuxVar(metadataContainerIDMuxName, utils.AnythingButEmptyRegEx)
ContainerMetadataPath specifies the relative URI path for serving container metadata.
var ContainerStatsPath = TaskStatsPathWithSlash + utils.ConstructMuxVar(statsContainerIDMuxName, utils.AnythingButEmptyRegEx)
ContainerStatsPath specifies the relative URI path for serving container stats.
Functions ¶
func NewContainerResponse ¶
func NewContainerResponse( dockerContainer *apicontainer.DockerContainer, eni *ni.NetworkInterface, includeV4Metadata bool, ) tmdsv2.ContainerResponse
NewContainerResponse creates a new container response TODO: remove includeV4Metadata from NewContainerResponse
func NewContainerResponseFromState ¶
func NewContainerResponseFromState( containerID string, state dockerstate.TaskEngineState, includeV4Metadata bool, ) (*tmdsv2.ContainerResponse, error)
NewContainerResponseFromState creates a new container response based on container id TODO: remove includeV4Metadata from NewContainerResponseFromState/NewContainerResponse
func NewTaskResponse ¶
func NewTaskResponse( taskARN string, state dockerstate.TaskEngineState, ecsClient ecs.ECSClient, cluster string, az string, containerInstanceArn string, propagateTags bool, includeV4Metadata bool, ) (*tmdsv2.TaskResponse, error)
NewTaskResponse creates a new response object for the task
func NewTaskStatsResponse ¶
func NewTaskStatsResponse(taskARN string, state dockerstate.TaskEngineState, statsEngine stats.Engine) (map[string]*types.StatsJSON, error)
NewTaskStatsResponse returns a new task stats response object
func TaskContainerMetadataHandler ¶
func TaskContainerMetadataHandler(state dockerstate.TaskEngineState, ecsClient ecs.ECSClient, cluster, az, containerInstanceArn string, propagateTags bool) func(http.ResponseWriter, *http.Request)
TaskContainerMetadataHandler returns the handler method for handling task and container metadata requests.
func TaskContainerStatsHandler ¶
func TaskContainerStatsHandler(state dockerstate.TaskEngineState, statsEngine stats.Engine) func(http.ResponseWriter, *http.Request)
TaskContainerStatsHandler returns the handler method for handling task and container stats requests.
func WriteContainerMetadataResponse ¶
func WriteContainerMetadataResponse(w http.ResponseWriter, containerID string, state dockerstate.TaskEngineState)
WriteContainerMetadataResponse writes the container metadata to response writer.
func WriteContainerStatsResponse ¶
func WriteContainerStatsResponse(w http.ResponseWriter, taskARN string, containerID string, statsEngine stats.Engine)
WriteContainerStatsResponse writes the container stats to response writer.
func WriteTaskMetadataResponse ¶
func WriteTaskMetadataResponse(w http.ResponseWriter, taskARN string, cluster string, state dockerstate.TaskEngineState, ecsClient ecs.ECSClient, az, containerInstanceArn string, propagateTags bool)
WriteTaskMetadataResponse writes the task metadata to response writer.
func WriteTaskStatsResponse ¶
func WriteTaskStatsResponse(w http.ResponseWriter, taskARN string, state dockerstate.TaskEngineState, statsEngine stats.Engine)
WriteTaskStatsResponse writes the task stats to response writer.
Types ¶
This section is empty.