草庐IT

spring-cloud-config

全部标签

mysql - 去+MySql : how easy is to migrate to GKE (Google Cloud Container Engine)?

我的项目目前由独立的云提供商托管。我正在使用2个虚拟机,以及Linux:一个托管Go应用程序一个托管MySql数据库我现在想迁移到GoogleCloudPlatform。您认为迁移到GoogleCointainerEngine(GKE)而不是GoogleComputeEngine(它与我在当前提供商处使用的虚拟机模型(IaaS)相同)是否有意义?我从未使用过Kubernetes和Docker。进行迁移有多容易?我会让我的生活变得毫无意义吗?我的简单模型的配置有多难? 最佳答案 IhaveneverusedKubernetesandD

Golang Config File 应该加载自己的包

这个问题在这里已经有了答案:howtoreferencearelativefilefromcodeandtests(3个答案)关闭5年前。我有两个项目1.网络项目2.经纪人项目services-web/util.go-main.go-cofig.jsonbroker-consumer/redis.go-consumer/mongo.go-main.go-//Idonotwanttomakeacopyhere我为我的Web项目开发了一个实用程序,它使用config.json文件。在该实用程序中,我使用如下代码file,_:=os.Open("./config.json")这很好用。当我将

go - Cloud EndPoint GRPC 不匹配原型(prototype)定义

我正在使用GoogleCloudEndPoints访问以GoLang编写并在Kuberkules中运行的GRPC服务器。我正在关注here的教程.一切正常,但当我尝试请求时出现此错误rpc错误:code=NotFounddesc=方法不存在。EndPoint没有保存URL在我的原型(prototype)文件中有一个,名称中包含包。这是一个例子:logrequest在最后一个请求中,我更改了生成的protobuf文件中url的值,它通过了端点,但我的服务器不识别它......我得到了这个错误:rpcerror:code=Unimplementeddesc=unknownservicecl

go - 使用代理连接到 Google Cloud SQL——错误 403 : Insufficient Permission

EDIT:我现在认为问题出在我的Golangpod通过本地主机与代理pod通信,如第二条错误消息所示。我将服务帐户凭据JSON文件添加到我的Docker镜像的GOOGLE_APPLICATION_CREDENTIALS环境变量中。这样做之后,使用my-project:us-central1:my-instance作为下面的connName就可以了。但是,当我尝试使用容器中的DB_HOST环境变量作为connName时,我仍然收到以下404错误。ORIGINALPOST我正在关注thisguide从KubernetesEngine上的pod连接到GoogleCloudSQL。该pod正在

google-cloud-platform - `datastore: invalid entity type` 来自 `datastore.NewQuery("的错误 ").Ancestor(myKey)`

我在我的Go应用程序中使用"cloud.google.com/go/datastore"库(下面的库版本),遇到错误datastore:invalidentity当我使用Ancestor()查询时键入。这是我的方法调用:ctx:=context.Background()client,err:=datastore.NewClient(ctx,"MyProjectId",option.WithCredentialsFile(myJsonFile))//...errcheck...myId:=112233myKey:=datastore.IDKey("MyKind",myId,nil)que

go - 如何在 Minio SDK 中设置 Content-MD5 header 以上传到 IBM Cloud Object Storage?

当我使用MinioGolangSDK将文件上传到S3时,我试图设置Content-MD5header。我可以在不设置Content-MD5的情况下成功将文件上传到AWS,但上传到IBMCloudObjectStorage失败并出现以下错误:ERR:Objectwritefailed,reason:Missingrequiredheaderforthisrequest:Content-MD5根据MinioSDK,https://docs.minio.io/docs/golang-client-api-reference#FPutObject我使用minio.PutObjectOption

go - 在 pkg-config 搜索路径中找不到包 rdkafka

在pkg-config搜索路径中找不到包rdkafka。Confluentgopackage抛出这样的错误#pkg-config--cflags--rdkafkaPackagerdkafkawasnotfoundinthepkg-configsearchpath.Perhapsyoushouldaddthedirectorycontaining`rdkafka.pc'tothePKG_CONFIG_PATHenvironmentvariableNopackage'rdkafka'foundpkg-config:exitstatus1我该如何解决这个问题?我尝试将它添加到路径但没有骰子!

去 source.cloud.google.com 获取

我有一个托管在source.cloud.google.com上的项目。我希望使用goget和gomodules来管理它。当我执行goget时,我得到以下信息:$gogetsource.cloud.google.com//gogetsource.cloud.google.com//:unrecognizedimportpath"source.cloud.google.com//"(parsehttps://source.cloud.google.com//?go-get=1:nogo-importmetatags())有人让这个工作吗? 最佳答案

go - 如何在 Google Cloud Platform 中保存计算引擎 VM 实例设置?

我在GoogleCloudPlatform中创建了一个计算引擎VM实例。然后我使用从https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz下载的标准程序安装了go。.一切正常,我能够运行go应用程序。但是,当我重新打开它时关闭实例后,它说没有安装go。消息如下。-bash:go:命令未找到如何保存实例设置? 最佳答案 Creating,Deleting,andDeprecatingCustomImagesYoucancreatecustomimagesofbootdisksandus

java - 在 Eureka Server 中,发现和注册服务/应用程序不是在 Spring 中开发的

如何在EurekaServer中发现和注册没有使用Spring(例如,在Java-JEE和Go上)构建的Web应用程序?在Spring-Boot应用程序中,很容易添加这些注释:@EnableDiscoveryClient@SpringBootApplication之前publicclassEurekaClientApp{publicstaticvoidmain(String[]args){SpringApplication.run(EurekaClientApp.class,args);}}在配置中,application.propertieseureka.client.registe