tarball

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: May 5, 2015 License: Apache-2.0 Imports: 15 Imported by: 49

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPClient = http.Client{
	Transport: &http.Transport{
		Proxy: http.ProxyFromEnvironment,
		Dial: (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 0 * time.Second,
		}).Dial,
		TLSHandshakeTimeout: 10 * time.Second,
	},
}

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(sha1 string) (path string, found bool)
	Path(sha1 string) (path string)
	Save(sourcePath string, sha1 string) error
}

func NewCache

func NewCache(basePath string, fs boshsys.FileSystem, logger boshlog.Logger) Cache

type Provider

type Provider interface {
	Get(Source, biui.Stage) (path string, err error)
}

func NewProvider

func NewProvider(
	cache Cache,
	fs boshsys.FileSystem,
	httpClient bihttpclient.HTTPClient,
	sha1Calculator bicrypto.SHA1Calculator,
	downloadAttempts int,
	delayTimeout time.Duration,
	logger boshlog.Logger,
) Provider

type Source

type Source interface {
	GetURL() string
	GetSHA1() string
	Description() string
}

Jump to

Keyboard shortcuts

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