discover

package
v0.0.0-...-900132f Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2016 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Region        string
	Cluster       string
	DefaultDomain string

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cluster, region, defaultdomain string) *Client

func (*Client) ContainerInstance

func (c *Client) ContainerInstance(ContainerInstanceARN *string) (*string, error)

ContainerInstance takes a Container Instance ARN and returns the EC2 Instance ID attached to the ARN

func (*Client) ContainerInstances

func (c *Client) ContainerInstances() ([]*string, error)

ContainerInstances fetches ALL ContainerARNs for a given cluster. The API limits to 100 items per call, this function will keep looping until everything is pulled.

func (*Client) DiscoverECSTasks

func (c *Client) DiscoverECSTasks() error

func (*Client) ECSTask

func (c *Client) ECSTask(TaskARN *string) (*ecs.Task, error)

ECSTask takes a TaskARN and returns a Task

func (*Client) ECSTasks

func (c *Client) ECSTasks(TaskARNs []*string) ([]*ecs.Task, error)

ECSTasks takes a list of TaskARNs and returns all the associated ECS Tasks

func (*Client) LookupInstanceIPAddress

func (c *Client) LookupInstanceIPAddress(instanceID *string) (*string, error)

LookupInstanceIPAddress takes an Instance ID and returns the Private IP Address

func (*Client) TaskARNs

func (c *Client) TaskARNs() ([]*string, error)

TaskARNs fetches ALL TaskARNs for a given cluster. The API limits to 100 items per call, this function will keep looping until everything is pulled.

func (*Client) TaskDefinition

func (c *Client) TaskDefinition(TaskDefinitionARN *string) (*ecs.TaskDefinition, error)

TaskDefinition takes a TaskDefinitionARN and returns an associated Task Definition

func (*Client) TaskDefinitions

func (c *Client) TaskDefinitions(Tasks []*ecs.Task) (map[string]*ecs.TaskDefinition, error)

TaskDefinitions takes a list of Tasks and pulls the Task Definition for each

func (*Client) Tasks

func (c *Client) Tasks() map[string]Service

Tasks returns the tasks available

type Service

type Service struct {
	Endpoint string
	Tasks    []Task
}

type Task

type Task struct {
	Name          string
	TaskARN       string
	IPAddress     string
	ContainerPort string
	HostPort      int
}

Jump to

Keyboard shortcuts

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