handlers

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2015 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 12 Imported by: 0

Documentation

Overview

Package handlers deals with the agent introspection api.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetadataV1RequestHandlerMaker

func MetadataV1RequestHandlerMaker(containerInstanceArn *string, cfg *config.Config) func(http.ResponseWriter, *http.Request)

func ServeHttp

func ServeHttp(containerInstanceArn *string, taskEngine engine.TaskEngine, cfg *config.Config)

func TasksV1RequestHandlerMaker

func TasksV1RequestHandlerMaker(taskEngine engine.TaskEngine) func(http.ResponseWriter, *http.Request)

Creates response for the 'v1/tasks' API. Lists all tasks if the request doesn't contain any fields. Returns a Task if either of 'dockerid' or 'taskarn' are specified in the request.

Types

type ContainerResponse

type ContainerResponse struct {
	DockerId   string
	DockerName string
	Name       string
}

type LoggingHandler

type LoggingHandler struct {
	// contains filtered or unexported fields
}

func (LoggingHandler) ServeHTTP

func (lh LoggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MetadataResponse

type MetadataResponse struct {
	Cluster              string
	ContainerInstanceArn *string
	Version              string
}

type RootResponse

type RootResponse struct {
	AvailableCommands []string
}

type TaskResponse

type TaskResponse struct {
	Arn           string
	DesiredStatus string `json:",omitempty"`
	KnownStatus   string
	Family        string
	Version       string
	Containers    []ContainerResponse
}

func NewTaskResponse

func NewTaskResponse(task *api.Task, containerMap map[string]*api.DockerContainer) *TaskResponse

type TasksResponse

type TasksResponse struct {
	Tasks []*TaskResponse
}

func NewTasksResponse

func NewTasksResponse(state *dockerstate.DockerTaskEngineState) *TasksResponse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL