[英]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.