-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add skywire-cli subcommands #1270
Conversation
client := rpcClient() | ||
overview, err := client.Overview() | ||
if err != nil { | ||
log.Fatal("Failed to connect:", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe leave a message here to ask the user if the visor is running...Applies for some other commands as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed more than just this instance with next commit
url = fmt.Sprintf("http://127.0.0.1:8000/pty/%s", overview.PubKey.Hex()) | ||
} | ||
} else { | ||
url = fmt.Sprintf("http://127.0.0.1:8000/pty/%s", pk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the hostname need to be configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the circumstance for that is rare, but you are correct that the behavior does assume its running locally.
Configurable, Im not sure.
We could print the LAN ip address / have a flag flag that would print that.
…ands. Remove hv srvpk subcommand. Limit hv skychat command to linux. Allow skywire-cli visor start as non root
…ands. Remove hv srvpk subcommand. Limit hv skychat command to linux. Allow skywire-cli visor start as non root
I've fixed a lot of the typography in the skywire-cli subcommands & made capitalization consistent for subcommands I've also done some minor rearrangements to just the files and folders containing some subcommands; to overall reduce the number of packages being imported & reduce some code. Ive fixed the errors returned by the vpnservers and remotevisors api endpoints removed the |
Did you run
make format && make check
?yes
Fixes pull request review issue from skycoin/skybian#134 ; creating http endpoint for querying the hypervisor's public key*re-implemented srvpk into skybian much more simply here
Changes:
Creates HTTP endpoint forskywire cli visor pk
withskywire-cli hv srvpk
skywire-cli hv
subcommands (see systray PR)skywire-cli
visor commandsHow to test this PR:
Clone my fork, checkout srvpk branch and start a visor
start the http endpoint in a new terminal or tab(ctrl
+shift
+t
)~~ ~~go run cmd/skywire-cli/skywire-cli.go hv srvpk~~ ~~
query the http endpoint at http://127.0.0.1:7998 in the browseror in a new terminal or tab using curl(ctrl
+shift
+t
)~~ ~~curl http://127.0.0.1:7998~~ ~~
The output should be the same as the following:~~ ~~go run cmd/skywire-cli/skywire-cli.go visor pk~~ ~~
without the trailing newline