简体   繁体   English

Google Cloud Dataflow 可以在 Go 中没有外部 IP 地址的情况下运行吗?

[英]Can Google Cloud Dataflow be run without an external IP address in Go?

According to the documentation it's possible to run Dataflow without using public IP. But it only have information for Java and Python. I'm not able to find a way to do it in Go:-(.根据文档,可以在不使用公共 IP 的情况下运行数据流。但它只有 Java 和 Python 的信息。我无法在 Go 中找到执行此操作的方法:-(。

Go is not yet officially supported on Dataflow (hence the lack of documentation), but the same flags exist in the Go SDK and should work exactly the same way. Dataflow 尚未正式支持 Go(因此缺少文档),但 Go SDK 中存在相同的标志,并且应该以完全相同的方式工作。

Solution: IpConfiguration: "WORKER_IP_PRIVATE"解决方案: IpConfiguration: "WORKER_IP_PRIVATE"

Like this for context:像这样的上下文:

    response := dataflowService.Projects.Locations.Templates.Create(PROJECT_ID, location, &dataflow.CreateJobFromTemplateRequest{
    Environment: &dataflow.RuntimeEnvironment{
        AdditionalExperiments:   []string{},
        AdditionalUserLabels:    map[string]string{},
        BypassTempDirValidation: false,
        EnableStreamingEngine:   false,
        IpConfiguration:         "WORKER_IP_PRIVATE",
        KmsKeyName:              "",
        MachineType:             "",
        MaxWorkers:              0,
        Network:                 "",
        NumWorkers:              0,
        ServiceAccountEmail:     "",
        Subnetwork:              "https://www.googleapis.com/compute/v1/projects/" + HOST_PROJECT_ID + "/regions/europe-north1/subnetworks/" + SUBNETWORK + "",
        TempLocation:            "",
        WorkerRegion:            "",
        WorkerZone:              "",
        Zone:                    "",
        ForceSendFields:         []string{},
        NullFields:              []string{},
    },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GCP,Cloud Run 外部 IP 不工作 - GCP, Cloud Run external IP is not working 如何将 static 外部地址 IP 附加到 GCP Cloud TPU 虚拟机? - How can I attach a static external IP address with a GCP Cloud TPU VM? 谷歌云 HTTP 没有外部负载均衡器健康检查失败 IP - Google Cloud HTTP Load Balancer Health Check Fails Without An External IP 如何在我的 Cloud-Run Flask 应用程序中获取用户的 IP 地址? - How can I get the user's IP-Address in my Cloud-Run Flask app? 在 Google Cloud Run 上运行 go 程序而不监听传入的 HTTP 请求 - Running go program on Google Cloud Run without listening for incoming HTTP requests 如何使用自定义 Docker 图像运行 Python Google Cloud Dataflow 作业? - How to run a Python Google Cloud Dataflow job with a custom Docker image? Cloud Run 服务未获取客户端正确的 IP 地址 - Cloud Run Service not picking up client correct IP address 是否可以在谷歌云控制台或 firebase 控制台中更改项目 ip 地址 - Is it possible to change project ip address in google cloud console or firebase console 无法访问谷歌云计算实例外部 IP - Cannot access Google Cloud Compute Instance External IP 无法在 Google Cloud Dataflow 虚拟机中使用 ping 命令? - Can't use ping command in Google Cloud Dataflow vm?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM