github.com/okex/exchain@v1.8.0/libs/tendermint/proxy/app_conn_test.go (about) 1 package proxy 2 3 import ( 4 abcicli "github.com/okex/exchain/libs/tendermint/abci/client" 5 "github.com/okex/exchain/libs/tendermint/abci/types" 6 ) 7 8 //---------------------------------------- 9 10 type AppConnTest interface { 11 EchoAsync(string) *abcicli.ReqRes 12 FlushSync() error 13 InfoSync(types.RequestInfo) (*types.ResponseInfo, error) 14 } 15 16 type appConnTest struct { 17 appConn abcicli.Client 18 } 19 20 func NewAppConnTest(appConn abcicli.Client) AppConnTest { 21 return &appConnTest{appConn} 22 } 23 24 func (app *appConnTest) EchoAsync(msg string) *abcicli.ReqRes { 25 return app.appConn.EchoAsync(msg) 26 } 27 28 func (app *appConnTest) FlushSync() error { 29 return app.appConn.FlushSync() 30 } 31 32 func (app *appConnTest) InfoSync(req types.RequestInfo) (*types.ResponseInfo, error) { 33 return app.appConn.InfoSync(req) 34 }