cmd/api: custom rpc host
This commit is contained in:
parent
6bd43bbaa5
commit
a7b7102609
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue