use request struct for Info

This commit is contained in:
Ethan Buchman
2017-09-22 11:10:39 -04:00
parent 3d1fd4cefa
commit 667c2543ea
15 changed files with 152 additions and 202 deletions

View File

@ -233,8 +233,8 @@ func (cli *socketClient) FlushAsync() *ReqRes {
return cli.queueRequest(types.ToRequestFlush())
}
func (cli *socketClient) InfoAsync() *ReqRes {
return cli.queueRequest(types.ToRequestInfo())
func (cli *socketClient) InfoAsync(req types.RequestInfo) *ReqRes {
return cli.queueRequest(types.ToRequestInfo(req))
}
func (cli *socketClient) SetOptionAsync(key string, value string) *ReqRes {
@ -290,8 +290,8 @@ func (cli *socketClient) FlushSync() error {
return cli.Error()
}
func (cli *socketClient) InfoSync() (resInfo types.ResponseInfo, err error) {
reqres := cli.queueRequest(types.ToRequestInfo())
func (cli *socketClient) InfoSync(req types.RequestInfo) (resInfo types.ResponseInfo, err error) {
reqres := cli.queueRequest(types.ToRequestInfo(req))
cli.FlushSync()
if err := cli.Error(); err != nil {
return resInfo, err