Skip to content

Commit

Permalink
Remove the compatibility helper, since nobody is using it now.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameinel committed Jan 30, 2017
1 parent 6a5b1f4 commit ba42b27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions network/ssh/reachable.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,3 @@ func (r *reachableChecker) FindHost(hostPorts []network.HostPort, publicKeys []s
close(stop)
return network.HostPort{}, errors.Errorf("cannot connect to any address: %v", hostPorts)
}

func ReachableHostPort(hostPorts []network.HostPort, publicKeys []string, dialer Dialer, timeout time.Duration) (network.HostPort, error) {
checker := NewReachableChecker(dialer, timeout)
return checker.FindHost(hostPorts, publicKeys)
}
3 changes: 2 additions & 1 deletion scripts/ssh-keycheck/ssh_keycheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ func main() {
logger.Infof("found %d known hosts\n", len(pubKeys))
logger.Debugf("known hosts: %v\n", pubKeys)
dialer := &net.Dialer{Timeout: time.Duration(dialTimeout) * time.Millisecond}
found, err := jujussh.ReachableHostPort(hostPorts, pubKeys, dialer, time.Duration(waitTimeout)*time.Millisecond)
checker := jujussh.NewReachableChecker(dialer, time.Duration(waitTimeout)* time.Millisecond)
found, err := checker.FindHost(hostPorts, pubKeys)
if err != nil {
fmt.Fprintf(os.Stderr, "could not find valid host: %v\n", err)
return
Expand Down

0 comments on commit ba42b27

Please sign in to comment.