Documentation ¶
Overview ¶
Package ecs provides a client to make API requests to Amazon Elastic Container Service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECS ¶ added in v0.0.8
type ECS struct {
// contains filtered or unexported fields
}
ECS wraps an AWS ECS client.
func (*ECS) Service ¶ added in v0.0.8
Service calls ECS API and returns the specified service running in the cluster.
func (*ECS) ServiceTasks ¶ added in v0.0.8
ServiceTasks calls ECS API and returns ECS tasks running in the cluster.
func (*ECS) TaskDefinition ¶ added in v0.0.8
func (e *ECS) TaskDefinition(taskDefName string) (*TaskDefinition, error)
TaskDefinition calls ECS API and returns the task definition.
type Service ¶
Service wraps up ECS Service struct.
func (*Service) ServiceStatus ¶ added in v0.0.8
func (s *Service) ServiceStatus() ServiceStatus
ServiceStatus returns the status of the running service.
type ServiceArn ¶ added in v0.0.8
type ServiceArn string
ServiceArn is the arn of an ECS service.
func (*ServiceArn) ClusterName ¶ added in v0.0.8
func (s *ServiceArn) ClusterName() (string, error)
ClusterName returns the cluster name. For example: arn:aws:ecs:us-west-2:1234567890:service/my-project-test-Cluster-9F7Y0RLP60R7/my-project-test-my-app-Service-JSOH5GYBFAIB will return my-project-test-Cluster-9F7Y0RLP60R7
func (*ServiceArn) ServiceName ¶ added in v0.0.8
func (s *ServiceArn) ServiceName() (string, error)
ServiceName returns the service name. For example: arn:aws:ecs:us-west-2:1234567890:service/my-project-test-Cluster-9F7Y0RLP60R7/my-project-test-my-app-Service-JSOH5GYBFAIB will return my-project-test-my-app-Service-JSOH5GYBFAIB
type ServiceStatus ¶ added in v0.0.8
type ServiceStatus struct { DesiredCount int64 `json:"desiredCount"` RunningCount int64 `json:"runningCount"` Status string `json:"status"` LastDeploymentAt int64 `json:"lastDeploymentAt"` TaskDefinition string `json:"taskDefinition"` }
ServiceStatus contains the status info of a service.
type Task ¶ added in v0.0.8
Task wraps up ECS Task struct.
func (*Task) TaskStatus ¶ added in v0.0.8
func (t *Task) TaskStatus() (*TaskStatus, error)
TaskStatus returns the status of the running task.
type TaskDefinition ¶
type TaskDefinition ecs.TaskDefinition
TaskDefinition wraps up ECS TaskDefinition struct.
func (*TaskDefinition) EnvironmentVariables ¶
func (t *TaskDefinition) EnvironmentVariables() map[string]string
EnvironmentVariables returns environment variables of the task definition.
type TaskStatus ¶ added in v0.0.8
type TaskStatus struct { Health string `json:"health"` ID string `json:"id"` Images []Image `json:"images"` LastStatus string `json:"lastStatus"` StartedAt int64 `json:"startedAt"` StoppedAt int64 `json:"stoppedAt"` StoppedReason string `json:"stoppedReason"` }
TaskStatus contains the status info of a task.
func (TaskStatus) HumanString ¶ added in v0.0.8
func (t TaskStatus) HumanString() string
HumanString returns the stringified TaskStatus struct with human readable format. Example output:
6ca7a60d f884127d RUNNING UNKNOWN 19 hours ago -