草庐IT

RPC和GRPC

全部标签

go - 在 gRPC Protocol Buffer golang 中创建 Map[string]interface{} 类型的变量

我正在使用grpcgolang在客户端和服务器应用程序之间进行通信。下面是ProtocolBuffer的代码。syntax="proto3";packageTrail;serviceTrailFunc{rpcHelloWorld(Request)returns(Reply){}}//Therequestmessagecontainingtheuser'sname.messageRequest{mapinputVar=1;}//TheresponsemessagecontainingthegreetingsmessageReply{stringoutputVar=1;}我需要在消息数据结

json - 如何在 Go 中正确调用 JSON-RPC?

我一直在尝试各种配置来调用asimpleJSON-RPCserverforBitcoin在Go中,但没有成功。在Python中,整个代码如下所示:fromjsonrpcimportServiceProxyaccess=ServiceProxy("http://user:pass@127.0.0.1:8332")printaccess.getinfo()但是在Go中,我似乎遇到了像"toomanycolonsinaddress"这样的错误。,或“没有这样的主机”。我试过使用rpc和rpc/jsonrpc这两个包,使用方法Dial和DialHTTP,使用各种网络参数,但仍然无法到达任何地方

go - 如何在服务器端读取grpc中的元数据? (golang 示例)

如何在grpc的服务器端读取元数据(作为header传递)?有golang中的例子吗?我正在写这样的东西://thisshouldbepassedfromtheclientsideasacontextandneedstoaccessedonserversidetoreadthemetadatavarheaders=metadata.New(map[string]string{"authorization":"","space":"","org":"","limit":"","offset":""})我想将授权token传递给我的验证函数以验证接收到的token。funcvalidate

go - 如何正确设置gRPC客户端-服务端

我有一个gRPC客户端和一个服务器,当我运行它们时它们似乎运行良好,但是当我尝试用客户端拨通服务器时我得到一个错误:"Error":{"code":14,"message":"allSubConnsareinTransientFailure"},不知道是什么。我试图通过谷歌找到解决方案,但没有成功。有什么想法吗?这是我的服务器代码:lis,err:=net.Listen("tcp",fmt.Sprintf("%s:%d",cfg.Host,cfg.Port))iferr!=nil{logger.Critical(ctx,"failedtolisten:%v",err)}else{log

go - 当客户端关闭连接时,grpc 转到 : how to know in server side,

我正在使用grpcgo我有一个大致像这样的rpc196serviceMyService{197//Operation1198rpcOperation1(OperationRequest)returns(OperationResponse){199option(google.api.http)={200post:"/apiver/myser/oper1"201body:"*"202};203}客户端使用grpc.Dial()方法连接当客户端连接时,服务器会做一些簿记工作。当客户端断开连接时,需要删除簿记。是否有任何可以注册的回调,可用于知道客户端已关闭session。

Git 克隆错误 : RPC failed; result=56, HTTP 代码 = 200

我正在尝试克隆(私有(private))远程存储库,但出现以下错误:remote:Countingobjects:11410,doneremote:Findingsources:100%(11410/11410)remote:Gettingsizes:100%(9178/9178)error:RPCfailed;result=56,HTTPcode=200error:inflate:datastreamerror(invalidblocktype)fatal:packhasbadobjectatoffset427781:inflatereturned-3我在Windows8ProBui

git - RPC 失败结果 22 http 代码 404

我使用的是BonoboGit服务器,一切看起来都很好。我将我所有的旧SVNrepo移动到GIT,甚至使用+760的大repo(大约3.5GB)提交“gitsvnclone”和“gitpush”工作得很好。但对于小型存储库则不然:它只有3Mb(未压缩)和1次提交。我总是收到的消息是:efrror:RPCFailed;result=22,HTTPcode=404fatal:Theremoteendhungupunexpectedly我已经按照推荐更改了bonobowebconfighere我已经做了thisconfigcommand.那么,有人有任何其他线索吗?

Git 推送错误 : RPC failed: curl 52

gitpush失败并出现以下错误fatal:RPCfailed:curl52:Emptyreplyfromserver如果只修改、添加或删除了一个文件,则上传成功。以下设置不能可靠地工作gitconfig--global--addcore.compression-1在ubuntu14.04上运行的git版本是2.8.2,openssl和gnutls编译都试过了。sshRemote也失败。存储库遇到问题bitbucketgithubgitlab感谢失败安全的答案 最佳答案 在终端使用sudo克隆,或输入:gitconfig--glob

Git 错误 : RPC failed; result=22, HTTP 代码 = 404

我在OSX上使用SourceTree并使用Git推送到VisualStudioOnline。我收到以下错误:POSTgit-receive-pack(490857233bytes)error:RPCfailed;result=22,HTTPcode=404fatal:TheremoteendhungupunexpectedlyEverythingup-to-dateCompletedwitherrors,seeabove我已经尝试过以下方法:gitconfig--globalhttp.postBuffer524288000 最佳答案

windows - git 克隆错误 : RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054

我在git上克隆存储库时遇到问题。我已经尝试了好几天并尝试了很多解决方案(在大多数情况下,问题略有不同但似乎适用)但没有做任何改变。我试过关闭防病毒软件和防火墙,但没有用。我还尝试过卸载并重新安装网络适配器驱动程序(并重新启动计算机),但没有用。据我所知,这是某个地方的网络问题,因为远程服务器一直挂起,但我无法解决这个问题。使用gitclone-v--progress似乎给出了与gitclone相同的输出。gitclone-v--progresshttps://github.com/mit-cml/appinventor-sources.git的输出Cloninginto'appinv