package rpc
import (
"git.apache.org/thrift.git/lib/go/thrift"
"crypto/tls"
"time"
)
func open() {
var (
addr = "192.168.1.100:4000"
timeout = time.Second * 10
transportFactory = thrift.NewTTransportFactory()
transport thrift.TTransport
err error
)
if transport, err = thrift.NewTSocketTimeout(addr, timeout); err != nil {
return
}
if transport, err = thrift.NewTSSLSocketTimeout(addr, &tls.Config{
InsecureSkipVerify: true,
}, timeout); err != nil {
return
}
transport = transportFactory.GetTransport(transport)
}