Documentation ¶
Overview ¶
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Pawel Dudzinski <paweldudzinski@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func DescribeCluster(svc *ecs.ECS, clusterName string) *ecs.Cluster
- func DescribeContainerInstances(svc *ecs.ECS, uuid string, clusterName string) *ecs.ContainerInstance
- func DescribeEC2Instance(session *session.Session, id string) (*ec2.Instance, error)
- func DescribeService(svc *ecs.ECS, serviceName string, clusterName string) *ecs.Service
- func DescribeTask(svc *ecs.ECS, name string) *ecs.TaskDefinition
- func Execute()
- func GetEC2Metrics(session *session.Session, id string) float64
- func PrintClusterInfo(c []Cluster)
- func PrintEvents(events []*ecs.ServiceEvent)
- func PrintInstancesInfo(i []ContainerInstance)
- func PrintServicesInfo(s []Service)
- func PrintTasksInfo(t []Task)
- type AWSCredentials
- type Cluster
- type ContainerInstance
- type Resource
- type Service
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DescribeCluster ¶
DescribeCluster returns cluster details
func DescribeContainerInstances ¶
func DescribeContainerInstances(svc *ecs.ECS, uuid string, clusterName string) *ecs.ContainerInstance
DescribeContainerInstances returns description of a container instance by uuid
func DescribeEC2Instance ¶
DescribeEC2Instance desc
func DescribeService ¶
DescribeService returns service details
func DescribeTask ¶
func DescribeTask(svc *ecs.ECS, name string) *ecs.TaskDefinition
DescribeTask returns task definition details
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetEC2Metrics ¶
GetEC2Metrics gets CloundWatch metrics for a given instance
func PrintClusterInfo ¶
func PrintClusterInfo(c []Cluster)
PrintClusterInfo pretty prints clusters informantion
func PrintEvents ¶
func PrintEvents(events []*ecs.ServiceEvent)
PrintEvents pretty print service events
func PrintInstancesInfo ¶
func PrintInstancesInfo(i []ContainerInstance)
PrintInstancesInfo pretty prints container instance description
func PrintServicesInfo ¶
func PrintServicesInfo(s []Service)
PrintServicesInfo pretty prints services informantion
Types ¶
type AWSCredentials ¶
AWSCredentials is a collection of AWS credentials
func (*AWSCredentials) GetSession ¶
func (c *AWSCredentials) GetSession() (*session.Session, error)
GetSession returns AWS session identifier
func (*AWSCredentials) InitAWS ¶
func (c *AWSCredentials) InitAWS(cmd *cobra.Command)
InitAWS collects AWS credentials from cmd line or env variables.
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster struct gathers information about ECS cluster.
type ContainerInstance ¶
type ContainerInstance struct { CPUUtilization float64 // contains filtered or unexported fields }
ContainerInstance contains information about EC2 instances
func ListInstances ¶
func ListInstances(session *session.Session, cluster string) ([]ContainerInstance, error)
ListInstances lists cluster container instances
type Resource ¶
type Resource struct { CPU int64 // contains filtered or unexported fields }
Resource contains information about CPU and memory resources