tarball

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

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(source Source) (path string, found bool)
	Path(source Source) (path string)
	Save(sourcePath string, source Source) 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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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