-
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
skywire-cli vpn
subcommands + separate-systray
#1317
Changes from all commits
8dde57a
405d731
0f83f14
b202365
70dfbb6
c7bbb0e
498aa61
a2b1a5c
8ddf64d
ab9bf63
37b22e1
f5d0e06
73d4dbf
d5e68d6
67bb78c
b42e900
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package clirpc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Package may as well just be called |
||
|
||
import ( | ||
"net" | ||
"time" | ||
|
||
"github.com/skycoin/skywire-utilities/pkg/logging" | ||
"github.com/skycoin/skywire/pkg/visor" | ||
) | ||
|
||
var ( | ||
logger = logging.MustGetLogger("skywire-cli") | ||
//Addr is the address (ip:port) of the rpc server | ||
Addr string | ||
) | ||
|
||
// Client is used by other skywire-cli commands to query the visor rpc | ||
func Client() visor.API { | ||
const rpcDialTimeout = time.Second * 5 | ||
conn, err := net.DialTimeout("tcp", Addr, rpcDialTimeout) | ||
if err != nil { | ||
logger.Fatal("RPC connection failed; is skywire running?\n", err) | ||
} | ||
return visor.NewRPCClient(logger, conn, visor.RPCPrefix, 0) | ||
} |
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.
Some of these variables seem unsued.