release

package
v0.0.0-...-1c44903 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LongInterval  = 1 * time.Hour
	ShortInterval = 1 * time.Minute
)

Variables

This section is empty.

Functions

func NewArtifactsDownloader

func NewArtifactsDownloader(
	repository Repository,
	latestReleases int,
	includePreReleases bool,
	client *http.Client,
	downloader TextFileDownloader,
	log *logrus.Entry) *artifactsDownloader

func NewReleaseRepository

func NewReleaseRepository(connection *dbr.Connection, generator uuid.UUIDGenerator) *releaseRepository

Types

type FileDownloader

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

FileDownloader downloads text files

func NewFileDownloader

func NewFileDownloader(getter httpGetter) *FileDownloader

func (*FileDownloader) Download

func (fd *FileDownloader) Download(url string) (string, error)

Download downloads text file

func (*FileDownloader) DownloadOrEmpty

func (fd *FileDownloader) DownloadOrEmpty(url string) (string, error)

DownloadOrEmpty downloads text file If the response status is 404 return empty string with no error

type OnDemandWrapper

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

OnDemandWrapper wraps release.Repository with minimal functionality necessary for downloading the Kyma release from on-demand versions

func NewOnDemandWrapper

func NewOnDemandWrapper(downloader TextFileDownloader, releaseRepo Repository) *OnDemandWrapper

NewOnDemandWrapper returns new instance of OnDemandWrapper

func (*OnDemandWrapper) GetReleaseByVersion

func (o *OnDemandWrapper) GetReleaseByVersion(version string) (model.Release, dberrors.Error)

GetReleaseByVersion returns the release. If release cannot be found in db then it tries to download the tiller and installer yaml files from on-demand version (lazy init).

type Provider

type Provider interface {
	GetReleaseByVersion(version string) (model.Release, dberrors.Error)
}

type Repository

type Repository interface {
	Provider
	ReleaseExists(version string) (bool, dberrors.Error)
	SaveRelease(artifacts model.Release) (model.Release, dberrors.Error)
}

type TextFileDownloader

type TextFileDownloader interface {
	Download(url string) (string, error)
	DownloadOrEmpty(url string) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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