--wip-- [skip ci]

pull/6733/head
Evan Sosenko 6 years ago
parent ef5b25dbf0
commit 0220419930

@ -35,6 +35,7 @@ type options struct {
username string username string
password string password string
userAgent string userAgent string
cachePath string
} }
// Option allows specifying various settings configurable by the user for overriding the defaults // Option allows specifying various settings configurable by the user for overriding the defaults
@ -73,6 +74,14 @@ func WithTLSClientConfig(certFile, keyFile, caFile string) Option {
} }
} }
// WithCache will wrap all HTTP requests through the local file system cache.
// Charts are cached in a flat structure with name equal to the chart digest.
func WithCache(digest string) Option {
return func(opts *options) {
opts.cachePath = path.Join(helmpath.ChartCachePath(), digest) // new?
}
}
// Getter is an interface to support GET to the specified URL. // Getter is an interface to support GET to the specified URL.
type Getter interface { type Getter interface {
// Get file content by url string // Get file content by url string

Loading…
Cancel
Save