tarball

package
v0.0.103 Latest Latest
Warning

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

Go to latest
Published: May 23, 2017 License: Apache-2.0 Imports: 16 Imported by: 14 modules, 49 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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