tendermint/proxy/remote_app_conn.go

24 lines
503 B
Go
Raw Normal View History

2015-12-01 20:12:01 -08:00
package proxy
import (
2016-01-25 14:34:08 -08:00
tmspcli "github.com/tendermint/tmsp/client"
2015-12-01 20:12:01 -08:00
)
// This is goroutine-safe, but users should beware that
// the application in general is not meant to be interfaced
// with concurrent callers.
type remoteAppConn struct {
2016-03-24 10:42:05 -07:00
tmspcli.Client
2015-12-01 20:12:01 -08:00
}
2016-05-23 11:36:00 -07:00
func NewRemoteAppConn(addr, transport string) (*remoteAppConn, error) {
client, err := tmspcli.NewClient(addr, transport, false)
2016-02-08 00:48:58 -08:00
if err != nil {
return nil, err
}
appConn := &remoteAppConn{
2016-02-21 23:56:46 -08:00
Client: client,
2015-12-01 20:12:01 -08:00
}
2016-02-08 00:48:58 -08:00
return appConn, nil
2015-12-01 20:12:01 -08:00
}