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,
	downloadAttempts int,
	delayTimeout time.Duration,
	logger boshlog.Logger,
) Provider

type Source

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

Directories

Path Synopsis