cmd/puppeth: concurrent server dials and health checks

This commit is contained in:
Péter Szilágyi
2017-10-19 14:40:43 +03:00
parent 8c78449a9e
commit 7b258c9681
3 changed files with 150 additions and 101 deletions

View File

@ -28,6 +28,7 @@ import (
"sort"
"strconv"
"strings"
"sync"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
@ -75,7 +76,8 @@ type wizard struct {
servers map[string]*sshClient // SSH connections to servers to administer
services map[string][]string // Ethereum services known to be running on servers
in *bufio.Reader // Wrapper around stdin to allow reading user input
in *bufio.Reader // Wrapper around stdin to allow reading user input
lock sync.Mutex // Lock to protect configs during concurrent service discovery
}
// read reads a single line from stdin, trimming if from spaces.