func (cli *grpcClient) InfoAsync() *ReqRes { req := types.ToRequestInfo() res, err := cli.client.Info(context.Background(), req.GetInfo(), grpc.FailFast(true)) if err != nil { cli.StopForError(err) } return cli.finishAsyncCall(req, &types.Response{&types.Response_Info{res}}) }
func (cli *socketClient) InfoSync() (res types.Result) { reqres := cli.queueRequest(types.ToRequestInfo()) cli.FlushSync() if err := cli.Error(); err != nil { return types.ErrInternalError.SetLog(err.Error()) } resp := reqres.Response.GetInfo() return types.Result{Code: OK, Data: []byte(resp.Info), Log: LOG} }
func (app *localClient) InfoAsync() *ReqRes { app.mtx.Lock() info := app.Application.Info() app.mtx.Unlock() return app.callback( types.ToRequestInfo(), types.ToResponseInfo(info), ) }
func (cli *socketClient) InfoAsync() *ReqRes { return cli.queueRequest(types.ToRequestInfo()) }