DownloadExecutableBinaryFromURL fetches a plugin binary from the specified URL, if it exists.
(pluginURL string, tempPluginDir string, proxyReader plugin.ProxyReader)
| 60 | // DownloadExecutableBinaryFromURL fetches a plugin binary from the specified |
| 61 | // URL, if it exists. |
| 62 | func (actor Actor) DownloadExecutableBinaryFromURL(pluginURL string, tempPluginDir string, proxyReader plugin.ProxyReader) (string, error) { |
| 63 | tempFile, err := makeTempFile(tempPluginDir) |
| 64 | if err != nil { |
| 65 | return "", err |
| 66 | } |
| 67 | |
| 68 | err = actor.client.DownloadPlugin(pluginURL, tempFile.Name(), proxyReader) |
| 69 | if err != nil { |
| 70 | return "", err |
| 71 | } |
| 72 | |
| 73 | return tempFile.Name(), nil |
| 74 | } |
| 75 | |
| 76 | // FileExists returns true if the file exists. It returns false if the file |
| 77 | // doesn't exist or there is an error checking. |
nothing calls this directly
no test coverage detected