Documentation
¶
Index ¶
- Constants
- func CredentialsHandler(credentialsManager credentials.Manager, auditLogger audit.AuditLogger) func(http.ResponseWriter, *http.Request)
- func NewTaskStatsResponse(taskARN string, state dockerstate.TaskEngineState, statsEngine stats.Engine) (map[string]*docker.Stats, error)
- func StatsHandler(state dockerstate.TaskEngineState, statsEngine stats.Engine) func(http.ResponseWriter, *http.Request)
- func TaskContainerMetadataHandler(state dockerstate.TaskEngineState, cluster string) func(http.ResponseWriter, *http.Request)
- type ContainerResponse
- type LimitsResponse
- type TaskResponse
Constants ¶
const StatsPath = "/v2/stats"
StatsPath specifies the relative URI path for serving task and container stats.
const TaskContainerMetadataPath = "/v2/metadata"
TaskContainerMetadataPath specifies the relative URI path for serving task metadata.
Variables ¶
This section is empty.
Functions ¶
func CredentialsHandler ¶
func CredentialsHandler(credentialsManager credentials.Manager, auditLogger audit.AuditLogger) func(http.ResponseWriter, *http.Request)
CredentialsHandler creates response for the 'v2/credentials' API.
func NewTaskStatsResponse ¶
func NewTaskStatsResponse(taskARN string, state dockerstate.TaskEngineState, statsEngine stats.Engine) (map[string]*docker.Stats, error)
NewTaskStatsResponse returns a new task stats response object
func StatsHandler ¶
func StatsHandler(state dockerstate.TaskEngineState, statsEngine stats.Engine) func(http.ResponseWriter, *http.Request)
StatsHandler creates response for 'v2/stats' API.
func TaskContainerMetadataHandler ¶
func TaskContainerMetadataHandler(state dockerstate.TaskEngineState, cluster string) func(http.ResponseWriter, *http.Request)
TaskContainerMetadataHandler returns the handler method for handling task metadata requests.
Types ¶
type ContainerResponse ¶
type ContainerResponse struct { ID string `json:"DockerId"` Name string DockerName string Image string ImageID string Ports []v1.PortResponse `json:",omitempty"` Labels map[string]string `json:",omitempty"` DesiredStatus string KnownStatus string ExitCode *int `json:",omitempty"` Limits LimitsResponse CreatedAt *time.Time `json:",omitempty"` StartedAt *time.Time `json:",omitempty"` FinishedAt *time.Time `json:",omitempty"` Type string Networks []containermetadata.Network `json:",omitempty"` Health *apicontainer.HealthStatus `json:",omitempty"` }
ContainerResponse defines the schema for the container response JSON object
func NewContainerResponse ¶
func NewContainerResponse(containerID string, state dockerstate.TaskEngineState) (*ContainerResponse, error)
NewContainerResponse creates a new container response based on container id
type LimitsResponse ¶
LimitsResponse defines the schema for task/cpu limits response JSON object
type TaskResponse ¶
type TaskResponse struct { Cluster string TaskARN string Family string Revision string DesiredStatus string `json:",omitempty"` KnownStatus string Containers []ContainerResponse `json:",omitempty"` Limits *LimitsResponse `json:",omitempty"` PullStartedAt *time.Time `json:",omitempty"` PullStoppedAt *time.Time `json:",omitempty"` ExecutionStoppedAt *time.Time `json:",omitempty"` }
TaskResponse defines the schema for the task response JSON object
func NewTaskResponse ¶
func NewTaskResponse(taskARN string, state dockerstate.TaskEngineState, cluster string) (*TaskResponse, error)
NewTaskResponse creates a new response object for the task