codedeploy

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeployStatusCreated    = "Created"
	DeployStatusInProgress = "InProgress"
	DeployStatusSucceeded  = "Succeeded"
	DeployStatusFailed     = "Failed"
	DeployStatusStopped    = "Stopped"
)

Deployment status constants.

View Source
const (
	InstanceStatusPending    = "Pending"
	InstanceStatusInProgress = "InProgress"
	InstanceStatusSucceeded  = "Succeeded"
	InstanceStatusFailed     = "Failed"
	InstanceStatusSkipped    = "Skipped"
)

InstanceDeploymentStatus constants for per-instance lifecycle.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	ID              string
	Name            string
	ARN             string
	ComputePlatform string
	CreatedAt       time.Time
	Tags            map[string]string
}

Application represents a CodeDeploy application.

type CodeDeployService

type CodeDeployService struct {
	// contains filtered or unexported fields
}

CodeDeployService is the cloudmock implementation of the AWS CodeDeploy API.

func New

func New(accountID, region string) *CodeDeployService

New returns a new CodeDeployService for the given AWS account ID and region.

func NewWithLocator

func NewWithLocator(accountID, region string, locator ServiceLocator) *CodeDeployService

NewWithLocator returns a new CodeDeployService with a ServiceLocator.

func (*CodeDeployService) Actions

func (s *CodeDeployService) Actions() []service.Action

Actions returns the list of CodeDeploy API actions supported.

func (*CodeDeployService) HandleRequest

func (s *CodeDeployService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes an incoming CodeDeploy request to the appropriate handler.

func (*CodeDeployService) HealthCheck

func (s *CodeDeployService) HealthCheck() error

HealthCheck always returns nil.

func (*CodeDeployService) Name

func (s *CodeDeployService) Name() string

Name returns the AWS service name used for routing.

func (*CodeDeployService) SetLocator

func (s *CodeDeployService) SetLocator(locator ServiceLocator)

SetLocator sets the service locator for cross-service calls.

type Deployment

type Deployment struct {
	ID                   string
	ARN                  string
	ApplicationName      string
	DeploymentGroupName  string
	DeploymentConfigName string
	Revision             RevisionLocation
	Status               string
	Description          string
	Creator              string
	CreateTime           time.Time
	StartTime            *time.Time
	CompleteTime         *time.Time
	Targets              []*InstanceTarget
	// contains filtered or unexported fields
}

Deployment represents a single deployment.

type DeploymentConfig

type DeploymentConfig struct {
	Name                 string
	ARN                  string
	ComputePlatform      string
	MinimumHealthyHosts  *MinimumHealthyHosts
	TrafficRoutingConfig *TrafficRoutingConfig
	CreatedAt            time.Time
	IsBuiltIn            bool
}

DeploymentConfig represents a CodeDeploy deployment configuration.

type DeploymentGroup

type DeploymentGroup struct {
	ID                   string
	Name                 string
	ARN                  string
	ApplicationName      string
	DeploymentConfigName string
	ServiceRoleARN       string
	AutoScalingGroups    []string
	Ec2TagFilters        []EC2TagFilter
	DeploymentStyle      DeploymentStyle
	CreatedAt            time.Time
	Tags                 map[string]string
}

DeploymentGroup represents a CodeDeploy deployment group.

type DeploymentStyle

type DeploymentStyle struct {
	DeploymentType   string
	DeploymentOption string
}

DeploymentStyle describes the deployment strategy.

type DeploymentTarget

type DeploymentTarget struct {
	DeploymentTargetType string
	InstanceTarget       *InstanceTarget
}

DeploymentTarget represents a deployment target instance.

type EC2TagFilter

type EC2TagFilter struct {
	Key   string
	Value string
	Type  string
}

EC2TagFilter is a tag filter for EC2 instances.

type GitHubLocation

type GitHubLocation struct {
	Repository string
	CommitID   string
}

GitHubLocation describes a GitHub revision location.

type InstanceTarget

type InstanceTarget struct {
	DeploymentID    string
	TargetID        string
	TargetARN       string
	Status          string
	LastUpdatedAt   time.Time
	LifecycleEvents []LifecycleEvent
}

InstanceTarget describes a deployment to an EC2 instance.

type LifecycleEvent

type LifecycleEvent struct {
	LifecycleEventName string
	Status             string
	StartTime          time.Time
	EndTime            *time.Time
}

LifecycleEvent represents a deployment lifecycle hook event.

type MinimumHealthyHosts

type MinimumHealthyHosts struct {
	Type  string
	Value int
}

MinimumHealthyHosts specifies the minimum number of healthy instances.

type RevisionLocation

type RevisionLocation struct {
	RevisionType   string
	S3Location     *S3Location
	GitHubLocation *GitHubLocation
}

RevisionLocation describes the deployment revision source.

type S3Location

type S3Location struct {
	Bucket     string
	Key        string
	BundleType string
	Version    string
}

S3Location describes an S3 revision location.

type ServiceLocator

type ServiceLocator interface {
	Lookup(name string) (service.Service, error)
}

ServiceLocator resolves other services for cross-service integration.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is the in-memory store for all CodeDeploy resources.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates an empty CodeDeploy store with built-in configs.

func (*Store) AddTagsToOnPremisesInstances

func (s *Store) AddTagsToOnPremisesInstances(instanceNames []string, tags map[string]string) *service.AWSError

func (*Store) BatchGetDeploymentTargets

func (s *Store) BatchGetDeploymentTargets(deploymentID string, targetIDs []string) ([]*DeploymentTarget, *service.AWSError)

func (*Store) BatchGetDeployments

func (s *Store) BatchGetDeployments(ids []string) ([]*Deployment, *service.AWSError)

func (*Store) CreateApplication

func (s *Store) CreateApplication(name, computePlatform string, tags map[string]string) (*Application, *service.AWSError)

func (*Store) CreateDeployment

func (s *Store) CreateDeployment(appName, groupName, configName, description string, revision RevisionLocation) (*Deployment, *service.AWSError)

func (*Store) CreateDeploymentConfig

func (s *Store) CreateDeploymentConfig(name, computePlatform string, minimumHealthyHosts *MinimumHealthyHosts, trafficRouting *TrafficRoutingConfig) (*DeploymentConfig, *service.AWSError)

func (*Store) CreateDeploymentGroup

func (s *Store) CreateDeploymentGroup(appName string, group *DeploymentGroup) (*DeploymentGroup, *service.AWSError)

func (*Store) DeleteApplication

func (s *Store) DeleteApplication(name string) *service.AWSError

func (*Store) DeleteDeploymentConfig

func (s *Store) DeleteDeploymentConfig(name string) *service.AWSError

func (*Store) DeleteDeploymentGroup

func (s *Store) DeleteDeploymentGroup(appName, groupName string) *service.AWSError

func (*Store) GetApplication

func (s *Store) GetApplication(name string) (*Application, *service.AWSError)

func (*Store) GetDeployment

func (s *Store) GetDeployment(deploymentID string) (*Deployment, *service.AWSError)

func (*Store) GetDeploymentConfig

func (s *Store) GetDeploymentConfig(name string) (*DeploymentConfig, *service.AWSError)

func (*Store) GetDeploymentGroup

func (s *Store) GetDeploymentGroup(appName, groupName string) (*DeploymentGroup, *service.AWSError)

func (*Store) ListApplications

func (s *Store) ListApplications() []string

func (*Store) ListDeploymentConfigs

func (s *Store) ListDeploymentConfigs() []string

func (*Store) ListDeploymentGroups

func (s *Store) ListDeploymentGroups(appName string) ([]string, *service.AWSError)

func (*Store) ListDeployments

func (s *Store) ListDeployments(appName, groupName, status string) []string

func (*Store) RemoveTagsFromOnPremisesInstances

func (s *Store) RemoveTagsFromOnPremisesInstances(instanceNames []string, tagKeys []string) *service.AWSError

func (*Store) StopDeployment

func (s *Store) StopDeployment(deploymentID string) (*Deployment, *service.AWSError)

func (*Store) UpdateApplication

func (s *Store) UpdateApplication(oldName, newName string) *service.AWSError

func (*Store) UpdateDeploymentGroup

func (s *Store) UpdateDeploymentGroup(appName, groupName string, updates map[string]any) (*DeploymentGroup, *service.AWSError)

type TimeBasedCanary

type TimeBasedCanary struct {
	CanaryPercentage int
	CanaryInterval   int
}

TimeBasedCanary specifies canary deployment config.

type TimeBasedLinear

type TimeBasedLinear struct {
	LinearPercentage int
	LinearInterval   int
}

TimeBasedLinear specifies linear deployment config.

type TrafficRoutingConfig

type TrafficRoutingConfig struct {
	Type            string
	TimeBasedCanary *TimeBasedCanary
	TimeBasedLinear *TimeBasedLinear
}

TrafficRoutingConfig specifies traffic routing for a deployment.

Jump to

Keyboard shortcuts

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