Documentation ¶
Index ¶
- type ALB
- func (a *ALB) CreateListener(protocol string, port int64, targetGroupArn string) error
- func (a *ALB) CreateRule(ruleType string, listenerArn string, targetGroupArn string, rules []string, ...) error
- func (a *ALB) CreateRuleForAllListeners(ruleType string, targetGroupArn string, rules []string, priority int64) ([]string, error)
- func (a *ALB) CreateRuleForListeners(ruleType string, listeners []string, targetGroupArn string, rules []string, ...) ([]string, error)
- func (a *ALB) CreateTargetGroup(serviceName string, d service.Deploy) (*string, error)
- func (a *ALB) DeleteListener(listenerArn string) error
- func (a *ALB) DeleteLoadBalancer() error
- func (a *ALB) DeleteTargetGroup(targetGroupArn string) error
- func (a *ALB) FindRule(listener string, targetGroupArn string, conditionField []string, ...) (*string, *string, error)
- func (a *ALB) GetDomain() string
- func (a *ALB) GetDomainUsingCertificate() error
- func (a *ALB) GetHighestRule() (int64, error)
- func (a *ALB) GetListeners() error
- func (a *ALB) GetRulesForAllListeners() error
- func (a *ALB) GetTargetGroupArn(serviceName string) (*string, error)
- func (a *ALB) ModifyTargetGroupAttributes(targetGroupArn string, d service.Deploy) error
- func (a *ALB) UpdateHealthCheck(targetGroupArn string, healthCheck service.DeployHealthCheck) error
- type AutoScaling
- func (a *AutoScaling) CompleteLifecycleAction(...) error
- func (a *AutoScaling) CompletePendingLifecycleAction(autoScalingGroupName, instanceId, action, lifecycleHookName string) error
- func (a *AutoScaling) CreateAutoScalingGroup(clusterName string, desiredCapacity int64, maxSize int64, minSize int64, ...) error
- func (a *AutoScaling) CreateLaunchConfiguration(clusterName string, keyName string, instanceType string, ...) error
- func (a *AutoScaling) DeleteAutoScalingGroup(clusterName string, forceDelete bool) error
- func (a *AutoScaling) DeleteLaunchConfiguration(clusterName string) error
- func (a *AutoScaling) GetAutoScalingGroupByTag(clusterName string) (string, error)
- func (a *AutoScaling) GetClusterNodeDesiredCount(autoScalingGroupName string) (int64, int64, int64, error)
- func (a *AutoScaling) GetLifecycleHookNames(autoScalingGroupName, lifecycleHookType string) ([]string, error)
- func (a *AutoScaling) ScaleClusterNodes(autoScalingGroupName string, change int64) error
- func (a *AutoScaling) WaitForAutoScalingGroupInService(clusterName string) error
- func (a *AutoScaling) WaitForAutoScalingGroupNotExists(clusterName string) error
- type CloudWatch
- type CloudWatchLog
- type CloudWatchLogEvent
- type ContainerDefinition
- type ContainerInstance
- type ContainerInstanceResource
- type ECR
- type ECS
- func (e *ECS) ConvertResourceToFir(cir []ContainerInstanceResource) (FreeInstanceResource, error)
- func (e *ECS) ConvertResourceToRir(cir []ContainerInstanceResource) (RegisteredInstanceResource, error)
- func (e *ECS) CreateCluster(clusterName string) (*string, error)
- func (e *ECS) CreateService(d service.Deploy) error
- func (e *ECS) CreateTaskDefinition(d service.Deploy) (*string, error)
- func (e *ECS) DeleteCluster(clusterName string) error
- func (e *ECS) DeleteKeyPair(keyName string) error
- func (e *ECS) DeleteService(clusterName, serviceName string) error
- func (e *ECS) DescribeContainerInstances(clusterName string, containerInstances []string) ([]ContainerInstance, error)
- func (e *ECS) DescribeService(clusterName string, serviceName string, showEvents bool, showTasks bool, ...) (service.RunningService, error)
- func (e *ECS) DescribeServices(clusterName string, serviceNames []*string, showEvents bool, showTasks bool, ...) ([]service.RunningService, error)
- func (e *ECS) DescribeTaskDefinition(taskDefinitionNameOrArn string) (TaskDefinition, error)
- func (e *ECS) DescribeTasks(clusterName string, tasks []*string) ([]service.RunningTask, error)
- func (e *ECS) DrainNode(clusterName, instance string) error
- func (e *ECS) GetClusterNameByInstanceId(instance string) (string, error)
- func (e *ECS) GetContainerInstanceArnByInstanceId(clusterName, instanceId string) (string, error)
- func (e *ECS) GetContainerLimits(d service.Deploy) (int64, int64, int64, int64)
- func (e *ECS) GetECSAMI() (string, error)
- func (e *ECS) GetFreeResources(clusterName string) ([]FreeInstanceResource, error)
- func (e *ECS) GetPubKeyFromPrivateKey(privateKey string) ([]byte, error)
- func (e *ECS) GetTaskDefinition(clusterName, serviceName string) (string, error)
- func (e *ECS) ImportKeyPair(keyName string, publicKey []byte) error
- func (e *ECS) IsEqualContainerLimits(d1 service.Deploy, d2 service.Deploy) bool
- func (e *ECS) LaunchWaitForDrainedNode(...) error
- func (e *ECS) LaunchWaitUntilServicesStable(dd *service.DynamoDeployment) error
- func (e *ECS) ListContainerInstances(clusterName string) ([]string, error)
- func (e *ECS) ListServices(clusterName string) ([]*string, error)
- func (e *ECS) ListTasks(clusterName, name, desiredStatus, filterBy string) ([]*string, error)
- func (e *ECS) ManualScaleService(clusterName, serviceName string, desiredCount int64) error
- func (e *ECS) Rollback(clusterName, serviceName string) error
- func (e *ECS) RunTask(clusterName, taskDefinition string, runTask service.RunTask) (string, error)
- func (e *ECS) ServiceExists(serviceName string) (bool, error)
- func (e *ECS) UpdateService(serviceName string, taskDefArn *string, d service.Deploy) (*string, error)
- func (e *ECS) WaitUntilServicesInactive(clusterName, serviceName string) error
- func (e *ECS) WaitUntilServicesStable(clusterName, serviceName string, maxWaitMinutes int) error
- type EcsVersionInfo
- type FreeInstanceResource
- type IAM
- func (e *IAM) AddRoleToInstanceProfile(instanceProfileName, roleName string) error
- func (e *IAM) AssumeRole(roleArn, roleSessionName, prevCreds string) (*credentials.Credentials, string, error)
- func (e *IAM) AttachRolePolicy(roleName, policyArn string) error
- func (e *IAM) CreateInstanceProfile(instanceProfileName string) error
- func (e *IAM) CreateRole(roleName, assumePolicyDocument string) (*string, error)
- func (e *IAM) DeleteInstanceProfile(instanceProfileName string) error
- func (e *IAM) DeleteRole(roleName string) error
- func (e *IAM) DeleteRolePolicy(roleName, policyName string) error
- func (e *IAM) GetAccountId() error
- func (e *IAM) GetEC2IAMTrust() string
- func (e *IAM) GetEcsServiceIAMTrust() string
- func (e *IAM) GetEcsServicePolicy() string
- func (e *IAM) GetEcsTaskIAMTrust() string
- func (e *IAM) PutRolePolicy(roleName, policyName, policy string) error
- func (e *IAM) RemoveRoleFromInstanceProfile(instanceProfileName, roleName string) error
- func (e *IAM) RoleExists(roleName string) (*string, error)
- func (e *IAM) WaitUntilInstanceProfileExists(instanceProfileName string) error
- type Parameter
- type Paramstore
- func (p *Paramstore) AssumeRole(roleArn, roleSessionName, prevCreds string) (string, error)
- func (p *Paramstore) Bootstrap(serviceName, prefix string, environment string, ...) error
- func (p *Paramstore) DeleteParameter(serviceName, parameter string) error
- func (p *Paramstore) GetParameterValue(name string) (*string, error)
- func (p *Paramstore) GetParameters(prefix string, withDecryption bool) error
- func (p *Paramstore) GetParamstoreIAMPolicy(serviceName string) string
- func (p *Paramstore) GetPrefix() string
- func (p *Paramstore) GetPrefixForService(serviceName string) string
- func (p *Paramstore) IsEnabled() bool
- func (p *Paramstore) PutParameter(serviceName string, parameter service.DeployServiceParameter) (*int64, error)
- func (p *Paramstore) RetrieveKeys() error
- type RegisteredInstanceResource
- type SNSPayload
- type SNSPayloadEcs
- type SNSPayloadEcsDetail
- type SNSPayloadEcsDetailAttributes
- type SNSPayloadGeneric
- type SNSPayloadLifecycle
- type SNSPayloadLifecycleDetail
- type TaskDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ALB ¶
type ALB struct { VpcId string Listeners []*elbv2.Listener Domain string Rules map[string][]*elbv2.Rule DnsName string // contains filtered or unexported fields }
ALB struct
func NewALBAndCreate ¶
func NewALBAndCreate(loadBalancerName, ipAddressType string, scheme string, securityGroups []string, subnets []string, lbType string) (*ALB, error)
get the listeners for the loadbalancer
func (*ALB) CreateListener ¶
func (*ALB) CreateRule ¶
func (*ALB) CreateRuleForAllListeners ¶
func (*ALB) CreateRuleForListeners ¶
func (*ALB) CreateTargetGroup ¶
func (*ALB) DeleteListener ¶
func (*ALB) DeleteLoadBalancer ¶
func (*ALB) DeleteTargetGroup ¶
func (*ALB) GetDomainUsingCertificate ¶
get the domain using certificates
func (*ALB) GetHighestRule ¶
func (*ALB) GetListeners ¶
get the listeners for the loadbalancer
func (*ALB) GetRulesForAllListeners ¶
get rules by listener
func (*ALB) GetTargetGroupArn ¶
func (*ALB) ModifyTargetGroupAttributes ¶
func (*ALB) UpdateHealthCheck ¶
func (a *ALB) UpdateHealthCheck(targetGroupArn string, healthCheck service.DeployHealthCheck) error
type AutoScaling ¶
type AutoScaling struct { }
ECR struct
func (*AutoScaling) CompleteLifecycleAction ¶
func (a *AutoScaling) CompleteLifecycleAction(autoScalingGroupName, instanceId, action, lifecycleHookName, lifecycleToken string) error
func (*AutoScaling) CompletePendingLifecycleAction ¶
func (a *AutoScaling) CompletePendingLifecycleAction(autoScalingGroupName, instanceId, action, lifecycleHookName string) error
func (*AutoScaling) CreateAutoScalingGroup ¶
func (*AutoScaling) CreateLaunchConfiguration ¶
func (*AutoScaling) DeleteAutoScalingGroup ¶
func (a *AutoScaling) DeleteAutoScalingGroup(clusterName string, forceDelete bool) error
func (*AutoScaling) DeleteLaunchConfiguration ¶
func (a *AutoScaling) DeleteLaunchConfiguration(clusterName string) error
func (*AutoScaling) GetAutoScalingGroupByTag ¶
func (a *AutoScaling) GetAutoScalingGroupByTag(clusterName string) (string, error)
func (*AutoScaling) GetClusterNodeDesiredCount ¶
func (*AutoScaling) GetLifecycleHookNames ¶
func (a *AutoScaling) GetLifecycleHookNames(autoScalingGroupName, lifecycleHookType string) ([]string, error)
func (*AutoScaling) ScaleClusterNodes ¶
func (a *AutoScaling) ScaleClusterNodes(autoScalingGroupName string, change int64) error
func (*AutoScaling) WaitForAutoScalingGroupInService ¶
func (a *AutoScaling) WaitForAutoScalingGroupInService(clusterName string) error
func (*AutoScaling) WaitForAutoScalingGroupNotExists ¶
func (a *AutoScaling) WaitForAutoScalingGroupNotExists(clusterName string) error
type CloudWatch ¶
type CloudWatch struct{}
func (*CloudWatch) CreateLogGroup ¶
func (cloudwatch *CloudWatch) CreateLogGroup(clusterName, logGroup string) error
func (*CloudWatch) DeleteLogGroup ¶
func (cloudwatch *CloudWatch) DeleteLogGroup(logGroup string) error
func (*CloudWatch) GetLogEventsByTime ¶
func (cloudwatch *CloudWatch) GetLogEventsByTime(logGroup, logStream string, startTime, endTime time.Time, nextToken string) (CloudWatchLog, error)
type CloudWatchLog ¶
type CloudWatchLog struct { NextBackwardToken string `json:"nextBackwardToken"` NextForwardToken string `json:"nextForwardToken"` LogEvents []CloudWatchLogEvent `json:"logEvents"` }
type CloudWatchLogEvent ¶
type ContainerDefinition ¶
type ContainerInstance ¶
type ContainerInstance struct { ContainerInstanceArn string Ec2InstanceId string AvailabilityZone string PendingTasksCount int64 RegisteredAt time.Time RegisteredResources []ContainerInstanceResource RemainingResources []ContainerInstanceResource RunningTasksCount int64 Status string Version int64 }
containerInstance
type ECS ¶
type ECS struct { ClusterName string ServiceName string IamRoleArn string TaskDefinition *ecs.RegisterTaskDefinitionInput TaskDefArn *string TargetGroupArn *string }
ECS struct
func (*ECS) ConvertResourceToFir ¶
func (e *ECS) ConvertResourceToFir(cir []ContainerInstanceResource) (FreeInstanceResource, error)
func (*ECS) ConvertResourceToRir ¶
func (e *ECS) ConvertResourceToRir(cir []ContainerInstanceResource) (RegisteredInstanceResource, error)
func (*ECS) CreateCluster ¶
create cluster
func (*ECS) CreateTaskDefinition ¶
Creates ECS repository
func (*ECS) DeleteKeyPair ¶
func (*ECS) DeleteService ¶
delete ECS service
func (*ECS) DescribeContainerInstances ¶
func (e *ECS) DescribeContainerInstances(clusterName string, containerInstances []string) ([]ContainerInstance, error)
describe container instances
func (*ECS) DescribeService ¶
func (e *ECS) DescribeService(clusterName string, serviceName string, showEvents bool, showTasks bool, showStoppedTasks bool) (service.RunningService, error)
describe services
func (*ECS) DescribeServices ¶
func (*ECS) DescribeTaskDefinition ¶
func (e *ECS) DescribeTaskDefinition(taskDefinitionNameOrArn string) (TaskDefinition, error)
func (*ECS) DescribeTasks ¶
func (*ECS) GetClusterNameByInstanceId ¶
func (*ECS) GetContainerInstanceArnByInstanceId ¶
func (*ECS) GetContainerLimits ¶
func (*ECS) GetFreeResources ¶
func (e *ECS) GetFreeResources(clusterName string) ([]FreeInstanceResource, error)
func (*ECS) GetPubKeyFromPrivateKey ¶
func (*ECS) GetTaskDefinition ¶
func (*ECS) IsEqualContainerLimits ¶
func (*ECS) LaunchWaitForDrainedNode ¶
func (*ECS) LaunchWaitUntilServicesStable ¶
func (e *ECS) LaunchWaitUntilServicesStable(dd *service.DynamoDeployment) error
func (*ECS) ListContainerInstances ¶
func (*ECS) ListServices ¶
list services
func (*ECS) ManualScaleService ¶
manual scale ECS service
func (*ECS) ServiceExists ¶
check whether service exists
func (*ECS) UpdateService ¶
func (e *ECS) UpdateService(serviceName string, taskDefArn *string, d service.Deploy) (*string, error)
Update ECS service
func (*ECS) WaitUntilServicesInactive ¶
wait until service is inactive
type EcsVersionInfo ¶
type EcsVersionInfo struct { AgentHash string `json:"agentHash"` AgentVersion string `json:"agentVersion"` DockerVersion string `json:"dockerVersion"` }
version info
type FreeInstanceResource ¶
type FreeInstanceResource struct { InstanceId string AvailabilityZone string Status string FreeMemory int64 FreeCpu int64 }
free instance resource
type IAM ¶
type IAM struct { AccountId string // contains filtered or unexported fields }
IAM struct
func (*IAM) AddRoleToInstanceProfile ¶
func (*IAM) AssumeRole ¶
func (e *IAM) AssumeRole(roleArn, roleSessionName, prevCreds string) (*credentials.Credentials, string, error)
func (*IAM) AttachRolePolicy ¶
func (*IAM) CreateInstanceProfile ¶
func (*IAM) CreateRole ¶
func (*IAM) DeleteInstanceProfile ¶
func (*IAM) DeleteRole ¶
func (*IAM) DeleteRolePolicy ¶
func (*IAM) GetAccountId ¶
func (*IAM) GetEC2IAMTrust ¶
func (*IAM) GetEcsServiceIAMTrust ¶
func (*IAM) GetEcsServicePolicy ¶
func (*IAM) GetEcsTaskIAMTrust ¶
func (*IAM) PutRolePolicy ¶
func (*IAM) RemoveRoleFromInstanceProfile ¶
func (*IAM) WaitUntilInstanceProfileExists ¶
type Parameter ¶
type Parameter struct { Name string `json:"name"` Type string `json:"type"` Value string `json:"value"` Version int64 `json:"version"` }
parameter type
type Paramstore ¶
Paramstore struct
func (*Paramstore) AssumeRole ¶
func (p *Paramstore) AssumeRole(roleArn, roleSessionName, prevCreds string) (string, error)
func (*Paramstore) Bootstrap ¶
func (p *Paramstore) Bootstrap(serviceName, prefix string, environment string, parameters []service.DeployServiceParameter) error
func (*Paramstore) DeleteParameter ¶
func (p *Paramstore) DeleteParameter(serviceName, parameter string) error
func (*Paramstore) GetParameterValue ¶
func (p *Paramstore) GetParameterValue(name string) (*string, error)
func (*Paramstore) GetParameters ¶
func (p *Paramstore) GetParameters(prefix string, withDecryption bool) error
func (*Paramstore) GetParamstoreIAMPolicy ¶
func (p *Paramstore) GetParamstoreIAMPolicy(serviceName string) string
func (*Paramstore) GetPrefix ¶
func (p *Paramstore) GetPrefix() string
func (*Paramstore) GetPrefixForService ¶
func (p *Paramstore) GetPrefixForService(serviceName string) string
func (*Paramstore) IsEnabled ¶
func (p *Paramstore) IsEnabled() bool
func (*Paramstore) PutParameter ¶
func (p *Paramstore) PutParameter(serviceName string, parameter service.DeployServiceParameter) (*int64, error)
func (*Paramstore) RetrieveKeys ¶
func (p *Paramstore) RetrieveKeys() error
type RegisteredInstanceResource ¶
type RegisteredInstanceResource struct { InstanceId string RegisteredMemory int64 RegisteredCpu int64 }
registered instance resource
type SNSPayload ¶
type SNSPayload struct { Message string `json:"Message"` MessageId string `json:"MessageId"` Signature string `json:"Signature"` SignatureVersion string `json:"SignatureVersion"` SigningCertURL string `json:"SigningCertURL"` SubscribeURL string `json:"SubscribeURL"` Subject string `json:"Subject"` Timestamp string `json:"Timestamp"` Token string `json:"Token"` TopicArn string `json:"TopicArn"` Type string `json:"Type" binding:"required"` UnsubscribeURL string `json:"UnsubscribeURL"` }
SNS payload
type SNSPayloadEcs ¶
type SNSPayloadEcs struct { Version string `json:"version"` Id string `json:"id"` DetailType string `json:"detail-type" binding:"required"` Source string `json:"source"` Account string `json:"account"` Time string `json:"time"` Region string `json:"region"` Resources []string `json:"resources"` Detail SNSPayloadEcsDetail `json:"detail"` }
ECS SNS Event
type SNSPayloadEcsDetail ¶
type SNSPayloadEcsDetail struct { ClusterArn string `json:"clusterArn"` ContainerInstanceArn string `json:"containerInstanceArn"` Ec2InstanceId string `json:"ec2InstanceId"` RegisteredResources []ContainerInstanceResource `json:"registeredResources"` RemainingResources []ContainerInstanceResource `json:"remainingResources"` Status string `json:"status"` Version int64 `json:"version"` VersionInfo EcsVersionInfo `json:"versionInfo"` UpdatedAt string `json:"updatedAt"` RegisteredAt string `json:"registeredAt"` Attributes []SNSPayloadEcsDetailAttributes `json:"attributes"` }
type SNSPayloadGeneric ¶
type SNSPayloadGeneric struct { Version string `json:"version"` Id string `json:"id"` DetailType string `json:"detail-type" binding:"required"` }
generic payload (to check detail type)
type SNSPayloadLifecycle ¶
type SNSPayloadLifecycle struct { Version string `json:"version"` Id string `json:"id"` DetailType string `json:"detail-type" binding:"required"` Source string `json:"source"` Account string `json:"account"` Time string `json:"time"` Region string `json:"region"` Resources []string `json:"resources"` Detail SNSPayloadLifecycleDetail `json:"detail"` }
lifecycle event
type SNSPayloadLifecycleDetail ¶
type SNSPayloadLifecycleDetail struct { LifecycleActionToken string `json:"LifecycleActionToken"` AutoScalingGroupName string `json:"AutoScalingGroupName"` LifecycleHookName string `json:"LifecycleHookName"` EC2InstanceId string `json:"EC2InstanceId"` LifecycleTransition string `json:"LifecycleTransition"` }
type TaskDefinition ¶
type TaskDefinition struct { Family string `json:"family"` Revision int64 `json:"revision"` ExecutionRoleArn string `json:"executionRole"` ContainerDefinitions []ContainerDefinition `json:"containerDefinitions"` }
Task definition and Container definition