types

package
v0.0.0-...-c83230f Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MIT Imports: 19 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateContainerDefinition

func CreateContainerDefinition(con *ContainerDefinition) (*ecs.ContainerDefinition, []*ecs.Volume, error)

func CreateServiceMap

func CreateServiceMap(data string) (map[string]Service, error)

func ParseEntrypoint

func ParseEntrypoint(target string) ([]*string, error)

func ToHostEntry

func ToHostEntry(entries []string) ([]*ecs.HostEntry, error)

func ToKeyValuePairs

func ToKeyValuePairs(values map[string]string) []*ecs.KeyValuePair

func ToPlacementConstraints

func ToPlacementConstraints(placementConstraints []PlacementConstraint) []*ecs.PlacementConstraint

func ToPlacementStrategy

func ToPlacementStrategy(placementStrategy []PlacementStrategy) []*ecs.PlacementStrategy

func ToPortMapping

func ToPortMapping(value string) (*ecs.PortMapping, error)

func ToPortMappings

func ToPortMappings(values []string) ([]*ecs.PortMapping, error)

func ToUlimits

func ToUlimits(entries map[string]Ulimit) []*ecs.Ulimit

func ToVolumesFrom

func ToVolumesFrom(value string) (*ecs.VolumeFrom, error)

func ToVolumesFroms

func ToVolumesFroms(values []string) ([]*ecs.VolumeFrom, error)

Types

type AutoScaling

type AutoScaling struct {
	Target *ServiceScalableTarget `yaml:"target"`
}

type BlueGreen

type BlueGreen struct {
	Blue       BlueGreenTarget     `yaml:"blue"`
	Green      BlueGreenTarget     `yaml:"green"`
	PrimaryElb string              `yaml:"primary_elb"`
	StandbyElb string              `yaml:"standby_elb"`
	ChainElb   []BlueGreenChainElb `yaml:"chain_elb"`
	ElbV2      *BlueGreenElbV2     `yaml:"elbv2"`
}

type BlueGreenChainElb

type BlueGreenChainElb struct {
	PrimaryElb string `yaml:"primary_elb"`
	StandbyElb string `yaml:"standby_elb"`
}

type BlueGreenElbV2

type BlueGreenElbV2 struct {
	TargetGroups []BlueGreenTargetGroupPair `yaml:"target_groups"`
}

type BlueGreenPlan

type BlueGreenPlan struct {
	Blue       *ServiceSet
	Green      *ServiceSet
	PrimaryElb string
	StandbyElb string
	ChainElb   []BlueGreenChainElb
	ElbV2      *BlueGreenElbV2
}

func (*BlueGreenPlan) IsBlueWithPrimaryElb

func (p *BlueGreenPlan) IsBlueWithPrimaryElb() bool

type BlueGreenTarget

type BlueGreenTarget struct {
	Cluster          string `yaml:"cluster"`
	Service          string `yaml:"service"`
	AutoscalingGroup string `yaml:"autoscaling_group"`
}

type BlueGreenTargetGroupPair

type BlueGreenTargetGroupPair struct {
	PrimaryGroup string `yaml:"primary_group"`
	StandbyGroup string `yaml:"standby_group"`
}

type Cluster

type Cluster struct {
	Name     string
	Services map[string]Service
}

type ContainerDefinition

type ContainerDefinition struct {
	Name                   string
	Image                  string            `yaml:"image"`
	Ports                  []string          `yaml:"ports"`
	Environment            map[string]string `yaml:"environment"`
	EnvFiles               []string          `yaml:"env_file"`
	Links                  []string          `yaml:"links"`
	Volumes                []string          `yaml:"volumes"`
	VolumesFrom            []string          `yaml:"volumes_from"`
	Memory                 *int64            `yaml:"memory"`
	MemoryReservation      *int64            `yaml:"memory_reservation"`
	CPUUnits               int64             `yaml:"cpu_units"`
	Essential              bool              `yaml:"essential"`
	EntryPoint             string            `yaml:"entry_point"`
	Command                string            `yaml:"command"`
	DisableNetworking      bool              `yaml:"disable_networking"`
	DNSSearchDomains       []string          `yaml:"dns_search"`
	DNSServers             []string          `yaml:"dns"`
	DockerLabels           map[string]string `yaml:"labels"`
	DockerSecurityOptions  []string          `yaml:"security_opt"`
	ExtraHosts             []string          `yaml:"extra_hosts"`
	Hostname               string            `yaml:"hostname"`
	LogDriver              string            `yaml:"log_driver"`
	LogOpt                 map[string]string `yaml:"log_opt"`
	Privileged             bool              `yaml:"privileged"`
	ReadonlyRootFilesystem bool              `yaml:"read_only"`
	Ulimits                map[string]Ulimit `yaml:"ulimits"`
	User                   string            `yaml:"user"`
	WorkingDirectory       string            `yaml:"working_dir"`
}

type LoadBalancer

type LoadBalancer struct {
	Name           null.String `yaml:"name"`
	ContainerName  string      `yaml:"container_name"`
	ContainerPort  int64       `yaml:"container_port"`
	TargetGroupARN null.String `yaml:"target_group_arn"`
}

type PlacementConstraint

type PlacementConstraint struct {
	Expression string `yaml:"expression"`
	Type       string `yaml:"type"`
}

type PlacementStrategy

type PlacementStrategy struct {
	Field string `yaml:"field"`
	Type  string `yaml:"type"`
}

type Service

type Service struct {
	Name                  string
	TaskDefinition        string                `yaml:"task_definition"`
	DesiredCount          int64                 `yaml:"desired_count"`
	KeepDesiredCount      bool                  `yaml:"keep_desired_count"`
	LoadBalancers         []LoadBalancer        `yaml:"load_balancers"`
	MinimumHealthyPercent null.Int              `yaml:"minimum_healthy_percent"`
	MaximumPercent        null.Int              `yaml:"maximum_percent"`
	Role                  string                `yaml:"role"`
	AutoScaling           *AutoScaling          `yaml:"autoscaling"`
	PlacementConstraints  []PlacementConstraint `yaml:"placement_constraints"`
	PlacementStrategy     []PlacementStrategy   `yaml:"placement_strategy"`
}

type ServiceScalableTarget

type ServiceScalableTarget struct {
	MinCapacity uint   `yaml:"min_capacity"`
	MaxCapacity uint   `yaml:"max_capacity"`
	Role        string `yaml:"role"`
}

type ServiceSet

type ServiceSet struct {
	CurrentService    *ecs.Service
	NewService        *BlueGreenTarget
	AutoScalingGroup  *autoscaling.Group
	ClusterUpdatePlan *ServiceUpdatePlan
}

type ServiceStack

type ServiceStack struct {
	Service     *ecs.Service
	AutoScaling *applicationautoscaling.ScalableTarget
}

type ServiceUpdatePlan

type ServiceUpdatePlan struct {
	Name            string
	InstanceARNs    []*string
	CurrentServices map[string]*ServiceStack
	NewServices     map[string]*Service
}

type TaskDefinition

type TaskDefinition struct {
	Name                 string
	ContainerDefinitions map[string]*ContainerDefinition
}

func CreateTaskDefinition

func CreateTaskDefinition(taskDefName string, data string, basedir string, s3Cli s3.Client) (*TaskDefinition, error)

type TaskUpdatePlan

type TaskUpdatePlan struct {
	Name          string
	NewContainers map[string]*ContainerDefinition
}

type TaskWatchStatus

type TaskWatchStatus int
const (
	WatchContinue TaskWatchStatus = iota
	WatchFinish
	WatchTerminate
)

type Ulimit

type Ulimit struct {
	Soft int64 `yaml:"soft"`
	Hard int64 `yaml:"hard"`
}

type VolumeInfo

type VolumeInfo struct {
	Volume     *ecs.Volume
	MountPoint *ecs.MountPoint
}

func CreateVolumeInfo

func CreateVolumeInfo(value string) (*VolumeInfo, error)

func CreateVolumeInfoItems

func CreateVolumeInfoItems(values []string) ([]*VolumeInfo, error)

Jump to

Keyboard shortcuts

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