Configurable limit for number of tracks (#197)

* configurable node track limit

* sample config

* todos

* end of file new line

* default max num tracks

* bandwidth limit

* client message for limit exceeded node

* 10 Gbps default network limit
This commit is contained in:
Mathew Kamkar
2021-11-23 15:48:07 -08:00
committed by GitHub
parent 5cdb1c4848
commit e3c91de594
10 changed files with 117 additions and 16 deletions
+8 -7
View File
@@ -183,18 +183,18 @@ func installDeps() error {
}
func installTools(force bool) error {
tools := []string{
"github.com/google/wire/cmd/wire",
tools := map[string]string{
"github.com/google/wire/cmd/wire": "latest",
}
for _, t := range tools {
if err := installTool(t, force); err != nil {
for t, v := range tools {
if err := installTool(t, v, force); err != nil {
return err
}
}
return nil
}
func installTool(url string, force bool) error {
func installTool(url, version string, force bool) error {
name := filepath.Base(url)
if !force {
_, err := getToolPath(name)
@@ -204,8 +204,9 @@ func installTool(url string, force bool) error {
}
}
fmt.Printf("installing %s\n", name)
cmd := exec.Command("go", "get", "-u", url)
fmt.Printf("installing %s %s\n", name, version)
urlWithVersion := fmt.Sprintf("%s@%s", url, version)
cmd := exec.Command("go", "install", urlWithVersion)
connectStd(cmd)
if err := cmd.Run(); err != nil {
return err