Documentation
¶
Index ¶
- func SetDeployDefaults(d *Deploy)
- type Autoscaling
- type AutoscalingPolicy
- type Deploy
- type DeployAppMesh
- type DeployAppMeshConfiguration
- type DeployAppMeshRetryPolicy
- type DeployContainer
- type DeployContainerEnvironment
- type DeployContainerHealthCheck
- type DeployContainerMountPoint
- type DeployContainerPortMapping
- type DeployContainerUlimit
- type DeployHealthCheck
- type DeployLogConfiguration
- type DeployLogConfigurationOptions
- type DeployNetworkConfiguration
- type DeployPlacementConstraint
- type DeployResult
- type DeployRuleConditions
- type DeployRuleConditionsCognitoAuth
- type DeployServiceParameter
- type DeployServices
- type DeployStickiness
- type DeployVolume
- type DeployVolumeDockerVolumeConfiguration
- type DeployVolumeHost
- type DynamoAutoscalingPull
- type DynamoCluster
- type DynamoClusterContainerInstance
- type DynamoClusterScalingOperation
- type DynamoDeployment
- type DynamoDeploymentAutoscaling
- type DynamoDeploymentScaling
- type DynamoServices
- type DynamoServicesElement
- type LoadBalancer
- type RunTask
- type RunTaskContainerOverride
- type RunningService
- type RunningServiceDeployment
- type RunningServiceEvent
- type RunningTask
- type RunningTaskContainer
- type Service
- func (s *Service) AutoscalingPullAcquireLock(localId string) (bool, error)
- func (s *Service) AutoscalingPullInit() error
- func (s *Service) CreateService(dsElement *DynamoServicesElement) error
- func (s *Service) CreateTable() error
- func (s *Service) GetApiVersion() (string, error)
- func (s *Service) GetClusterInfo() (*DynamoCluster, error)
- func (s *Service) GetClusterName() (string, error)
- func (s *Service) GetDeployment(serviceName string, strTime string) (*DynamoDeployment, error)
- func (s *Service) GetDeploys(action string, limit int64) ([]DynamoDeployment, error)
- func (s *Service) GetDeploysForService(serviceName string) ([]DynamoDeployment, error)
- func (s *Service) GetLastDeploy() (*DynamoDeployment, error)
- func (s *Service) GetScalingActivity(clusterName string, startTime time.Time) (string, string, error)
- func (s *Service) GetServiceVersionsByTags(serviceName, imageName string, tags map[string]string) ([]ServiceVersion, error)
- func (s *Service) GetServices(ds *DynamoServices) error
- func (s *Service) InitDB(apiVersion string) error
- func (s *Service) IsDeployRunning() (bool, error)
- func (s *Service) NewDeployment(taskDefinitionArn *string, d *Deploy) (*DynamoDeployment, error)
- func (s *Service) PutClusterInfo(dc DynamoCluster, clusterName string, action string, pendingAction string) (*DynamoCluster, error)
- func (s *Service) ServiceExistsInDynamo() (bool, error)
- func (s *Service) SetApiVersion(apiVersion string) error
- func (s *Service) SetAutoscalingProperties(desiredCount int64, resourceId string, policyNames []string) error
- func (s *Service) SetDeploymentStatus(dd *DynamoDeployment, status string) error
- func (s *Service) SetDeploymentStatusWithReason(dd *DynamoDeployment, status, reason string) error
- func (s *Service) SetManualTasksArn(manualTaskArn string) error
- func (s *Service) SetScalingProperty(desiredCount int64) error
- func (s *Service) UpdateServiceLimits(clusterName, serviceName string, ...) error
- func (s *Service) UpdateServiceListeners(clusterName, serviceName string, listeners []string) error
- type ServiceIf
- type ServiceVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDeployDefaults ¶ added in v0.0.39
func SetDeployDefaults(d *Deploy)
Types ¶
type Autoscaling ¶ added in v0.0.39
type Autoscaling struct {
MinimumCount int64 `json:"minimumCount" yaml:"minimumCount"`
DesiredCount int64 `json:"desiredCount" yaml:"desiredCount"`
MaximumCount int64 `json:"maximumCount" yaml:"maximumCount"`
Policies []AutoscalingPolicy `json:"policies" yaml:"policies"`
}
create Autoscaling Policy
type AutoscalingPolicy ¶ added in v0.0.39
type AutoscalingPolicy struct {
PolicyName string `json:"policyName" yaml:"policyName"`
ComparisonOperator string `json:"comparisonOperator" yaml:"comparisonOperator"`
Metric string `json:"metric" yaml:"metric"`
NewAutoscalingPolicy bool `json:"newAutoscalingPolicy" yaml:"newAutoscalingPolicy"`
Threshold float64 `json:"threshold" yaml:"threshold"`
ScalingAdjustment int64 `json:"scalingAdjustment" yaml:"scalingAdjustment"`
ThresholdStatistic string `json:"thresholdStatistic" yaml:"thresholdStatistic"`
DatapointsToAlarm int64 `json:"datapointsToAlarm" yaml:"datapointsToAlarm"`
EvaluationPeriods int64 `json:"evaluationPeriods" yaml:"evaluationPeriods"`
Period int64 `json:"period" yaml:"period"`
}
type Deploy ¶
type Deploy struct {
Cluster string `json:"cluster" yaml:"cluster" binding:"required"`
LoadBalancer string `json:"loadBalancer" yaml:"loadBalancer"`
ServiceName string `json:"serviceName" yaml:"serviceName"`
ServicePort int64 `json:"servicePort" yaml:"servicePort"`
ServiceProtocol string `json:"serviceProtocol" yaml:"serviceProtocol" binding:"required"`
DesiredCount int64 `json:"desiredCount" yaml:"desiredCount" binding:"required"`
MinimumHealthyPercent int64 `json:"minimumHealthyPercent" yaml:"minimumHealthyPercent"`
MaximumPercent int64 `json:"maximumPercent" yaml:"maximumPercent"`
Containers []*DeployContainer `json:"containers" yaml:"containers" binding:"required,dive"`
HealthCheck DeployHealthCheck `json:"healthCheck" yaml:"healthCheck"`
RuleConditions []*DeployRuleConditions `json:"ruleConditions" yaml:"ruleConditions"`
NetworkMode string `json:"networkMode" yaml:"networkMode"`
NetworkConfiguration DeployNetworkConfiguration `json:"networkConfiguration" yaml:"networkConfiguration"`
PlacementConstraints []DeployPlacementConstraint `json:"placementConstraints" yaml:"placementConstraints"`
LaunchType string `json:"launchType" yaml:"launchType"`
DeregistrationDelay int64 `json:"deregistrationDelay" yaml:"deregistrationDelay"`
Stickiness DeployStickiness `json:"stickiness" yaml:"stickiness"`
Volumes []DeployVolume `json:"volumes" yaml:"volumes"`
EnvNamespace string `json:"envNamespace" yaml:"envNamespace"`
ServiceRegistry string `json:"serviceRegistry" yaml:"serviceRegistry"`
SchedulingStrategy string `json:"schedulingStrategy" yaml:"schedulingStrategy"`
AppMesh DeployAppMesh `json:"appMesh" yaml:"appMesh"`
}
type DeployAppMesh ¶ added in v0.0.39
type DeployAppMesh struct {
Name string `json:"name" yaml:"name"`
Backends []string `json:"backends" yaml:"backends"`
RetryPolicy DeployAppMeshRetryPolicy `json:"retryPolicy" yaml:"retryPolicy"`
Configuration DeployAppMeshConfiguration `json:"configuration" yaml:"configuration"`
}
type DeployAppMeshConfiguration ¶ added in v0.0.39
type DeployAppMeshConfiguration struct {
EgressIgnoredPorts []string `json:"egressIgnoredPorts" yaml:"egressIgnoredPorts"`
}
type DeployAppMeshRetryPolicy ¶ added in v0.0.39
type DeployAppMeshRetryPolicy struct {
HTTPRetryEvents []string `json:"httpRetryEvents" yaml:"httpRetryEvents"`
MaxRetries int64 `json:"maxRetries" yaml:"maxRetries"`
PerRetryTimeout string `json:"perRetryTimeout" yaml:"perRetryTimeout"`
TcpRetryEvents []string `json:"tcpRetryEvents" yaml:"tcpRetryEvents"`
}
type DeployContainer ¶
type DeployContainer struct {
ContainerName string `json:"containerName" yaml:"containerName" binding:"required"`
ContainerTag string `json:"containerTag" yaml:"containerTag" binding:"required"`
ContainerPort int64 `json:"containerPort" yaml:"containerPort"`
ContainerCommand []*string `json:"containerCommand" yaml:"containerCommand"`
ContainerImage string `json:"containerImage" yaml:"containerImage"`
ContainerURI string `json:"containerURI" yaml:"containerURI"`
ContainerEntryPoint []*string `json:"containerEntryPoint" yaml:"containerEntryPoint"`
Essential bool `json:"essential" yaml:"essential"`
Memory int64 `json:"memory" yaml:"memory"`
MemoryReservation int64 `json:"memoryReservation" yaml:"memoryReservation"`
CPU int64 `json:"cpu" yaml:"cpu"`
CPUReservation int64 `json:"cpuReservation" yaml:"cpuReservation"`
DockerLabels map[string]string `json:"dockerLabels" yaml:"dockerLabels"`
HealthCheck DeployContainerHealthCheck `json:"healthCheck" yaml:"healthCheck"`
Environment []*DeployContainerEnvironment `json:"environment" yaml:"environment"`
MountPoints []*DeployContainerMountPoint `json:"mountPoints" yaml:"mountPoints"`
Ulimits []*DeployContainerUlimit `json:"ulimits" yaml:"ulimits"`
Links []*string `json:"links" yaml:"links"`
LogConfiguration DeployLogConfiguration `json:"logConfiguration" yaml:"logConfiguration"`
PortMappings []DeployContainerPortMapping `json:"portMappings" yaml:"portMappings"`
}
type DeployContainerEnvironment ¶ added in v0.0.39
type DeployContainerHealthCheck ¶ added in v0.0.39
type DeployContainerMountPoint ¶ added in v0.0.39
type DeployContainerPortMapping ¶ added in v0.0.39
type DeployContainerUlimit ¶ added in v0.0.39
type DeployHealthCheck ¶
type DeployHealthCheck struct {
HealthyThreshold int64 `json:"healthyThreshold" yaml:"healthyThreshold"`
UnhealthyThreshold int64 `json:"unhealthyThreshold" yaml:"unhealthyThreshold"`
Path string `json:"path" yaml:"path"`
Port string `json:"port" yaml:"port"`
Protocol string `json:"protocol" yaml:"protocol"`
Interval int64 `json:"interval" yaml:"interval"`
Matcher string `json:"matcher" yaml:"matcher"`
Timeout int64 `json:"timeout" yaml:"timeout"`
GracePeriodSeconds int64 `json:"gracePeriodSeconds" yaml:"gracePeriodSeconds"`
}
type DeployLogConfiguration ¶ added in v0.0.39
type DeployLogConfiguration struct {
LogDriver string `json:"logDriver" yaml:"logDriver"`
Options DeployLogConfigurationOptions `json:"options" yaml:"options"`
}
type DeployLogConfigurationOptions ¶ added in v0.0.39
type DeployResult ¶
type DeployResult struct {
ServiceName string `json:"serviceName" yaml:"serviceName"`
ClusterName string `json:"clusterName" yaml:"clusterName"`
TaskDefinitionArn string `json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
Status string `json:"status" yaml:"status"`
DeployError string `json:"deployError" yaml:"deployError"`
DeploymentTime time.Time `json:"deploymentTime" yaml:"deploymentTime"`
}
type DeployRuleConditions ¶
type DeployRuleConditions struct {
Listeners []string `json:"listeners" yaml:"listeners"`
PathPattern string `json:"pathPattern" yaml:"pathPattern"`
Hostname string `json:"hostname" yaml:"hostname"`
CognitoAuth DeployRuleConditionsCognitoAuth `json:"cognitoAuth" yaml:"cognitoAuth"`
}
type DeployRuleConditionsCognitoAuth ¶ added in v0.0.39
type DeployServiceParameter ¶
type DeployServices ¶
type DeployServices struct {
Services []Deploy `json:"services" yaml:"services" binding:"required"`
}
deploy binding from JSON
type DeployStickiness ¶
type DeployVolume ¶ added in v0.0.39
type DeployVolume struct {
Host DeployVolumeHost `json:"host" yaml:"host"`
DockerVolumeConfiguration DeployVolumeDockerVolumeConfiguration `json:"dockerVolumeConfiguration" yaml:"dockerVolumeConfiguration"`
Name string `json:"name" yaml:"name"`
}
type DeployVolumeDockerVolumeConfiguration ¶ added in v0.0.39
type DeployVolumeDockerVolumeConfiguration struct {
Scope string `json:"scope" yaml:"scope"`
Autoprovision bool `json:"autoprovision" yaml:"autoprovision"`
Driver string `json:"driver" yaml:"driver"`
DriverOpts map[string]string `json:"driverOpts" yaml:"driverOpts"`
Labels map[string]string `json:"labels" yaml:"labels"`
}
type DeployVolumeHost ¶ added in v0.0.39
type DeployVolumeHost struct {
SourcePath string `json:"sourcePath" yaml:"sourcePath"`
}
type DynamoAutoscalingPull ¶ added in v0.0.39
type DynamoAutoscalingPull struct {
Identifier string `dynamo:"ServiceName,hash"`
Time string `dynamo:"Time,range"`
Lock string `dynamo:"L"`
LockTimestamp time.Time `dynamo:"LT"`
}
dynamo pull struct
type DynamoCluster ¶
type DynamoCluster struct {
Identifier string `dynamo:"ServiceName,hash"`
Time time.Time `dynamo:"Time,range"`
ContainerInstances []DynamoClusterContainerInstance
ScalingOperation DynamoClusterScalingOperation
ExpirationTime time.Time
ExpirationTimeTTL int64
}
dynamo cluster struct
type DynamoDeployment ¶
type DynamoDeployment struct {
ServiceName string `dynamo:"ServiceName,hash"`
Time time.Time `dynamo:"Time,range" index:"DayIndex,range" index:"MonthIndex,range"`
Day string `index:"DayIndex,hash"`
Month string `index:"MonthIndex,hash"`
Status string
DeployError string
Tag string
Scaling DynamoDeploymentScaling
ManualTasksArns []string
TaskDefinitionArn *string
DeployData *Deploy
Version int64
}
type DynamoDeploymentAutoscaling ¶ added in v0.0.39
type DynamoDeploymentScaling ¶
type DynamoDeploymentScaling struct {
DesiredCount int64
Autoscaling DynamoDeploymentAutoscaling
}
type DynamoServices ¶
type DynamoServices struct {
ServiceName string `dynamo:"ServiceName,hash"`
Services []*DynamoServicesElement
Time string `dynamo:"Time,range"`
Version int64
ApiVersion string
}
dynamo services struct
type DynamoServicesElement ¶
type LoadBalancer ¶ added in v0.0.39
type RunTask ¶
type RunTask struct {
StartedBy string `json:"startedBy" yaml:"startedBy"`
ContainerOverrides []RunTaskContainerOverride `json:"containerOverrides" yaml:"containerOverrides"`
}
"Run ad-hoc task" type
type RunTaskContainerOverride ¶
type RunTaskContainerOverride struct {
Name string `json:"name" yaml:"name"`
Command []string `json:"command" yaml:"command"`
Environment []*DeployContainerEnvironment `json:"environment" yaml:"environment"`
}
type RunningService ¶
type RunningService struct {
ServiceName string `json:"serviceName" yaml:"serviceName"`
ClusterName string `json:"clusterName" yaml:"clusterName"`
RunningCount int64 `json:"runningCount" yaml:"runningCount"`
PendingCount int64 `json:"pendingCount" yaml:"pendingCount"`
DesiredCount int64 `json:"desiredCount" yaml:"desiredCount"`
Status string `json:"status" yaml:"status"`
Events []RunningServiceEvent `json:"events" yaml:"events"`
Deployments []RunningServiceDeployment `json:"deployments" yaml:"deployments"`
Tasks []RunningTask `json:"tasks" yaml:"tasks"`
}
type RunningServiceDeployment ¶
type RunningServiceDeployment struct {
Status string `json:"status" yaml:"status"`
RunningCount int64 `json:"runningCount" yaml:"runningCount"`
PendingCount int64 `json:"pendingCount" yaml:"pendingCount"`
DesiredCount int64 `json:"desiredCount" yaml:"desiredCount"`
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"`
TaskDefinition string `json:"taskDefinition" yaml:"taskDefinition"`
}
type RunningServiceEvent ¶
type RunningTask ¶
type RunningTask struct {
ContainerInstanceArn string `json:"containerInstanceArn" yaml:"containerInstanceArn"`
Containers []RunningTaskContainer `json:"containers" yaml:"containers"`
Cpu string `json:"cpu" yaml:"cpu"`
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
DesiredStatus string `json:"desiredStatus" yaml:"desiredStatus"`
ExecutionStoppedAt time.Time `json:"executionStoppedAt" yaml:"executionStoppedAt"`
Group string `json:"group" yaml:"group"`
LastStatus string `json:"lastStatus" yaml:"lastStatus"`
LaunchType string `json:"launchType" yaml:"launchType"`
Memory string `json:"memory" yaml:"memory"`
PullStartedAt time.Time `json:"pullStartedAt" yaml:"pullStartedAt"`
PullStoppedAt time.Time `json:"pullStoppedAt" yaml:"pullStoppedAt"`
StartedAt time.Time `json:"startedAt" yaml:"startedAt"`
StartedBy string `json:"startedBy" yaml:"startedBy"`
StoppedAt time.Time `json:"stoppedAt" yaml:"stoppedAt"`
StoppedReason string `json:"stoppedReason" yaml:"stoppedReason"`
StoppingAt time.Time `json:"stoppingAt" yaml:"stoppingAt"`
TaskArn string `json:"taskArn" yaml:"taskArn"`
TaskDefinitionArn string `json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
Version int64 `json:"version" yaml:"version"`
}
type RunningTaskContainer ¶
type Service ¶
type Service struct {
ServiceName string
ClusterName string
Listeners []string
// contains filtered or unexported fields
}
func NewService ¶
func NewService() *Service
func (*Service) AutoscalingPullAcquireLock ¶ added in v0.0.39
func (*Service) AutoscalingPullInit ¶ added in v0.0.39
func (*Service) CreateService ¶
func (s *Service) CreateService(dsElement *DynamoServicesElement) error
func (*Service) CreateTable ¶
func (*Service) GetApiVersion ¶
func (*Service) GetClusterInfo ¶
func (s *Service) GetClusterInfo() (*DynamoCluster, error)
func (*Service) GetClusterName ¶
func (*Service) GetDeployment ¶
func (s *Service) GetDeployment(serviceName string, strTime string) (*DynamoDeployment, error)
func (*Service) GetDeploys ¶
func (s *Service) GetDeploys(action string, limit int64) ([]DynamoDeployment, error)
func (*Service) GetDeploysForService ¶
func (s *Service) GetDeploysForService(serviceName string) ([]DynamoDeployment, error)
func (*Service) GetLastDeploy ¶
func (s *Service) GetLastDeploy() (*DynamoDeployment, error)
func (*Service) GetScalingActivity ¶
func (*Service) GetServiceVersionsByTags ¶
func (*Service) GetServices ¶
func (s *Service) GetServices(ds *DynamoServices) error
func (*Service) IsDeployRunning ¶ added in v0.0.39
func (*Service) NewDeployment ¶
func (s *Service) NewDeployment(taskDefinitionArn *string, d *Deploy) (*DynamoDeployment, error)
func (*Service) PutClusterInfo ¶
func (s *Service) PutClusterInfo(dc DynamoCluster, clusterName string, action string, pendingAction string) (*DynamoCluster, error)
func (*Service) ServiceExistsInDynamo ¶ added in v0.0.39
func (*Service) SetApiVersion ¶
func (*Service) SetAutoscalingProperties ¶ added in v0.0.39
func (*Service) SetDeploymentStatus ¶
func (s *Service) SetDeploymentStatus(dd *DynamoDeployment, status string) error
func (*Service) SetDeploymentStatusWithReason ¶
func (s *Service) SetDeploymentStatusWithReason(dd *DynamoDeployment, status, reason string) error
func (*Service) SetManualTasksArn ¶
func (*Service) SetScalingProperty ¶
func (*Service) UpdateServiceLimits ¶
type ServiceIf ¶ added in v0.0.39
type ServiceIf interface {
GetClusterInfo() (*DynamoCluster, error)
IsDeployRunning() (bool, error)
PutClusterInfo(dc DynamoCluster, clusterName string, action string, pendingAction string) (*DynamoCluster, error)
}
Service interface (for tests)
Click to show internal directories.
Click to hide internal directories.