v2

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Types

type ContainerResponse

type ContainerResponse struct {
	ID            string `json:"DockerId"`
	Name          string
	DockerName    string
	Image         string
	ImageID       string
	Ports         []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        *api.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

type LimitsResponse struct {
	CPU    *float64 `json:",omitempty"`
	Memory *int64   `json:",omitempty"`
}

LimitsResponse defines the schema for task/cpu limits response JSON object

type PortResponse

type PortResponse struct {
	ContainerPort uint16
	Protocol      string
	HostPort      uint16 `json:",omitempty"`
}

PortResponse defines the schema for portmapping 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

Jump to

Keyboard shortcuts

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