jjzjj

android-app

全部标签

google-app-engine - 谷歌云 sdks 不启动 Docker 图像 Mac OS 的预览

我的app.yamlruntime:customvm:trueapi_version:1health_check:enable_health_check:Falsedocker文件#Usetheofficialgodockerimagebuiltondebian.FROMgolang:1.5.1#Grabthesourcecodeandaddittotheworkspace.ADD./go/#InstallrevelandtherevelCLI.RUNgogetgithub.com/revel/revelRUNgogetgithub.com/revel/cmd/revel#Usethe

google-app-engine - Golang 分析应用引擎测试

我似乎有一个与接收大文件并将它们发送到GCS相关的内存泄漏。尝试使用pprof来分析我的应用引擎代码的内存使用情况。我的测试使用appengine/aetest,我可以输出内存配置文件,但结果似乎没有显示任何有用的信息。首先我做了一个基准测试。这是一个非常慢的操作,所以它只运行一次。$goapptest./cloudstore-run=none-bench=.-memprofile=cloud.profBenchmarkLargeFile154124706398ns/op$gotoolpprof--textcloudstore.testcloud.profAdjustingheappr

google-app-engine - 如何使用 Go 运行时在 App Engine 上的实例之间传递套接字?

Python运行时通过picklingtheconnection允许它.是否有类似的方式在经典AppEngine上使用Go运行时与google.golang.org/appengine/socket共享套接字? 最佳答案 描述符未在GoAPI中公开:https://github.com/golang/appengine/blob/master/socket/socket_classic.go#L152typeConnstruct{ctxcontext.Contextdescstringoffsetint64protpb.Create

java - 如何触发 java 应用程序(来自 Google GO/golang sub_process 的 java -jar <app name>

我正在尝试将java命令行应用程序作为golang的子进程触发。由于某种原因它失败了,实际上当我从GO启动它时我没有得到javaAPP界面。它等待几秒钟并以错误代码“无法连接...”终止这是我尝试使用的代码:packagemainimport("fmt""os/exec")funcmain(){start_java_app_test()}funcstart_java_app_test(){cmd_prep:="java-Xmx2g-jartest_app.jar"cmd_output,err:=exec.Command("bash","-c",cmd_prep).Output()ife

google-app-engine - 如何在应用引擎上使用 Go 获取 youtube 播放列表视频

使用Apikey,我能够从ApiExplorer获取播放列表中的视频。ExecutewithoutOAuth获取结果json。这是链接。https://developers.google.com/apis-explorer/?hl=en_US#p/youtube/v3/youtube.playlistItems.list?part=snippet&playlistId=PLHyTuYqPkZCzt7mWZ4hmmrRdjLJiw6O2T&_h=2&在AppEngine上使用Go实现相同的调用失败并出现以下错误:Gethttps://www.googleapis.com/youtube/

google-app-engine - golang 数据存储结构 : keeping field unique and required

我想知道如何最好地保证一个字段是唯一的,如果不是,则不会保存到数据存储中。另外,它应该是必需的。我将此字段用作stringID并需要它是唯一的。我知道我可以简单地尝试通过该字段获取实体并查看它是否存在并围绕它构建逻辑。但是有没有更简单的方法,比如在您的结构中声明该字段应该是唯一的和/或必需的?就像下面的模型。typeCarstruct{Regnrstring"required""unique"}谢谢! 最佳答案 来自数据存储API:Bydefault,forstructpointers,allpropertiesarepotenti

google-app-engine - 谷歌应用引擎 : Golang datastore. GetAll() 不工作

每周一次,cron作业会在我的一个应用引擎项目中调用以下函数:funccleanMealsFromDatabase(contextappengine.Context)error{query:=datastore.NewQuery("Essen").Limit(1000).KeysOnly()keys,err:=query.GetAll(context,nil)iferr!=nil{returnerr}returndatastore.DeleteMulti(context,keys)}我正在尝试批量删除一堆数据存储实体。该函数被正确调用,但是query.GetAll(context,ni

google-app-engine - 应用引擎/去 : 'goapp serve' giving an error "Go application could not be built" error

我正在尝试将Go与适用于Go的AppEngineSDK一起使用,当我运行goappserve时,在转到http://localhost:8080后打印浏览器时出现以下错误(我在终端中遇到类似的错误):TheGoapplicationcouldnotbebuilt.(Executedcommand:C:\go_appengine\goroot\bin\go-app-builder.exe-app_baseC:\Projects\Go\Davilex-arch6-dynamic-gorootC:\go_appengine\goroot-nobuild_files^^$-unsafe-gop

google-app-engine - google appengine golang API - InstanceClass

我正在编写一个使用golangAPI(https://godoc.org/google.golang.org/api/appengine/v1beta4)将代码部署到googleappengine的应用程序。对于缩放,我使用AutomaticScaling选项。这应该意味着我可以将实例类设置为F1、F2、F4或F4_1G。但是,每次我尝试将InstanceClass设置为任何值时,我都会收到以下响应:{"error":{"code":400,"message":"Requestcontainsaninvalidargument.","errors":[{"message":"Reque

google-app-engine - 去 sendgrid 失败

我正在尝试使用sendgrid和golang发送邮件。我正在使用"github.com/sendgrid/sendgrid-go"每当我在我的代码中运行发送电子邮件的部分时,我都会收到此错误:sendgrid.go:error:net/http:ClientTransportoftypeinit.failingTransportdoesn'tsupportCancelRequest;Timeoutnotsupported;response:我不知道这是什么..这是我的代码:sg:=sendgrid.NewSendGridClientWithApiKey("string")email:=