Documentation ¶
Index ¶
- Constants
- func UseSSMS3Service(context context.T, tracer trace.Tracer, endpoint string, repository string, ...) bool
- type PackageService
- func (ds *PackageService) DownloadArtifact(tracer trace.Tracer, packageName string, version string) (string, error)
- func (ds *PackageService) DownloadManifest(tracer trace.Tracer, packageName string, version string) (string, string, bool, error)
- func (ds *PackageService) GetPackageArnAndVersion(packageName string, packageVersion string) (name string, version string)
- func (ds *PackageService) PackageServiceName() string
- func (*PackageService) ReportResult(tracer trace.Tracer, result packageservice.PackageResult) error
Constants ¶
View Source
const ( // EndpointHolder represent placeholder for S3 endpoint EndpointHolder = "{Endpoint}" // RegionHolder represents placeholder for region RegionHolder = "{Region}" // PlatformHolder represents placeholder for platform PlatformHolder = "{Platform}" // ArchHolder represents placeholder for Arch ArchHolder = "{Arch}" // PackageNameFormat represents the package name format based PackageNameFormat = "{PackageName}.zip" // PackageURLStandard represents the s3 folder where all versions of a package live // the url to a specific package has a format like https://s3.us-east-1.amazonaws.com/amazon-ssm-packages-us-east-1/Packages/Test/windows/amd64/1.0.0/Test.zip PackageURLStandard = "https://{Endpoint}/amazon-ssm-packages-{Region}/BirdwatcherPackages/{PackageName}/{Platform}/{Arch}" // PackageURLBeta is the s3 location for ad-hoc testing by package developers PackageURLBeta = "https://s3.amazonaws.com/amazon-ssm-packages-beta/BirdwatcherPackages/{PackageName}/{Platform}/{Arch}" // PackageURLGamma is the s3 location for internal pre-production testing PackageURLGamma = "https://s3.amazonaws.com/amazon-ssm-packages-us-east-1-gamma/BirdwatcherPackages/{PackageName}/{Platform}/{Arch}" // PackageNameSuffix represents (when concatenated with the correct package url) the s3 location of a specific version of a package PackageNameSuffix = "/{PackageVersion}/" + PackageNameFormat // PatternVersion represents the regular expression for validating version PatternVersion = "^(?:(\\d+)\\.)(?:(\\d+)\\.)(\\d+)$" // ActiveServiceURL is the s3 object whose presence indicates the SSMS3 service implementation should be used ActiveServiceURL = "https://{Endpoint}/amazon-ssm-packages-{Region}/active-birdwatcher-fallback" ActiveServiceURLBeta = "https://s3.amazonaws.com/amazon-ssm-packages-beta/active-birdwatcher-fallback" ActiveServiceURLGamma = "https://s3.amazonaws.com/amazon-ssm-packages-us-east-1-gamma/active-birdwatcher-fallback" )
Variables ¶
This section is empty.
Functions ¶
func UseSSMS3Service ¶
func UseSSMS3Service(context context.T, tracer trace.Tracer, endpoint string, repository string, region string) bool
UseSSMS3Service checks for existence of the active service indicator file. If the file has been removed, it indicates that the new package service should be used
Types ¶
type PackageService ¶
type PackageService struct {
// contains filtered or unexported fields
}
func (*PackageService) DownloadArtifact ¶
func (*PackageService) DownloadManifest ¶
func (ds *PackageService) DownloadManifest(tracer trace.Tracer, packageName string, version string) (string, string, bool, error)
DownloadManifest looks up the latest version of a given package for this platform/arch in S3 or manifest at source location
func (*PackageService) GetPackageArnAndVersion ¶
func (ds *PackageService) GetPackageArnAndVersion(packageName string, packageVersion string) (name string, version string)
func (*PackageService) PackageServiceName ¶
func (ds *PackageService) PackageServiceName() string
func (*PackageService) ReportResult ¶
func (*PackageService) ReportResult(tracer trace.Tracer, result packageservice.PackageResult) error
Click to show internal directories.
Click to hide internal directories.