MCPcopy
hub / github.com/helm/helm / NewHTTPInstaller

Function NewHTTPInstaller

internal/plugin/installer/http_installer.go:48–72  ·  view source on GitHub ↗

NewHTTPInstaller creates a new HttpInstaller.

(source string)

Source from the content-addressed store, hash-verified

46
47// NewHTTPInstaller creates a new HttpInstaller.
48func NewHTTPInstaller(source string) (*HTTPInstaller, error) {
49 key, err := cache.Key(source)
50 if err != nil {
51 return nil, err
52 }
53
54 extractor, err := NewExtractor(source)
55 if err != nil {
56 return nil, err
57 }
58
59 get, err := getter.All(new(cli.EnvSettings)).ByScheme("http")
60 if err != nil {
61 return nil, err
62 }
63
64 i := &HTTPInstaller{
65 CacheDir: helmpath.CachePath("plugins", key),
66 PluginName: stripPluginName(filepath.Base(source)),
67 base: newBase(source),
68 extractor: extractor,
69 getter: get,
70 }
71 return i, nil
72}
73
74// Install downloads and extracts the tarball into the cache directory
75// and installs into the plugin directory.

Callers 1

NewForSourceFunction · 0.85

Calls 7

KeyFunction · 0.92
AllFunction · 0.92
CachePathFunction · 0.92
NewExtractorFunction · 0.85
stripPluginNameFunction · 0.85
newBaseFunction · 0.85
BySchemeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…