Documentation ¶
Index ¶
- func New(endpoint string, manifestCache packageservice.ManifestCache) packageservice.PackageService
- type File
- type Manifest
- type NanoTime
- type PackageInfo
- 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) PackageServiceName() string
- func (ds *PackageService) ReportResult(tracer trace.Tracer, result packageservice.PackageResult) error
- type TimeImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(endpoint string, manifestCache packageservice.ManifestCache) packageservice.PackageService
New constructor for PackageService
Types ¶
type File ¶
type File struct { Checksums map[string]string `json:"checksums"` DownloadLocation string `json:"downloadLocation"` Size int `json:"size"` }
File contains data for one SSM package
type Manifest ¶
type Manifest struct { SchemaVersion string `json:"schemaVersion"` PackageArn string `json:"packageArn"` Version string `json:"version"` // platform -> version -> arch -> file Packages map[string]map[string]map[string]*PackageInfo `json:"packages"` Files map[string]*File `json:"files"` }
Manifest contains references to all SSM packages for a given agent version
type NanoTime ¶
type NanoTime interface {
NowUnixNano() int64
}
NanoTime is helper interface for mocking time
type PackageInfo ¶
type PackageInfo struct {
File string `json:"file"`
}
PackageInfo contains references to Files matching the current platform/version/arch
type PackageService ¶
type PackageService struct {
// contains filtered or unexported fields
}
PackageService is the concrete type for Birdwatcher PackageService
func (*PackageService) DownloadArtifact ¶
func (ds *PackageService) DownloadArtifact(tracer trace.Tracer, packageName string, version string) (string, error)
DownloadArtifact downloads the platform matching artifact specified in the manifest
func (*PackageService) DownloadManifest ¶
func (ds *PackageService) DownloadManifest(tracer trace.Tracer, packageName string, version string) (string, string, bool, error)
DownloadManifest downloads the manifest for a given version (or latest) and returns the agent version specified in manifest
func (*PackageService) PackageServiceName ¶
func (ds *PackageService) PackageServiceName() string
func (*PackageService) ReportResult ¶
func (ds *PackageService) ReportResult(tracer trace.Tracer, result packageservice.PackageResult) error
ReportResult sents back the result of the install/upgrade/uninstall run back to Birdwatcher
Click to show internal directories.
Click to hide internal directories.