cmd/api: custom rpc host

This commit is contained in:
Cadey Ratio 2017-01-22 10:20:33 -08:00
parent 6bd43bbaa5
commit a7b7102609
1 changed files with 7 additions and 1 deletions

View File

@ -3,14 +3,20 @@ package main
import (
"crypto/rand"
"crypto/rsa"
"flag"
"log"
"net/rpc"
"git.xeserv.us/xena/route/routerpc"
)
var (
addr = flag.String("addr", "127.0.0.1:9234", "RPC host to connect to")
)
func main() {
client, err := rpc.DialHTTP("tcp", "127.0.0.1:9234")
flag.Parse()
client, err := rpc.DialHTTP("tcp", *addr)
if err != nil {
log.Fatal(err)
}