birdwatcher

package
v0.0.0-...-a9ed6da Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

type TimeImpl

type TimeImpl struct {
}

func (*TimeImpl) NowUnixNano

func (t *TimeImpl) NowUnixNano() int64

Directories

Path Synopsis
This interface is created manally based on the ssmiface.SSMAPI.
This interface is created manally based on the ssmiface.SSMAPI.

Jump to

Keyboard shortcuts

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