mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CLI: Reduce memory usage for plugin installation (#19639)
* grafana-cli: use tmp file when downloading plugin install file
This commit is contained in:
committed by
Arve Knudsen
parent
46a4118461
commit
b4712ec4b9
@@ -1,6 +1,8 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/grafana/grafana/pkg/cmd/grafana-cli/models"
|
||||
"github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
|
||||
@@ -27,7 +29,7 @@ type CommandLine interface {
|
||||
|
||||
type ApiClient interface {
|
||||
GetPlugin(pluginId, repoUrl string) (models.Plugin, error)
|
||||
DownloadFile(pluginName, filePath, url string, checksum string) (content []byte, err error)
|
||||
DownloadFile(pluginName string, tmpFile *os.File, url string, checksum string) (err error)
|
||||
ListAllPlugins(repoUrl string) (models.PluginRepo, error)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user