【发布时间】:2021-07-14 10:15:34
【问题描述】:
我们被分配将一些 Lambda 从 aws 迁移到 GCP。我在以下场景中遇到了困难。
in aws
public class Handler implements RequestHandler<GetVaccinationPlanRequest, VaccinationPlanResponse>{
public vaccinationPlanResponse handleRequest(GetVaccinationPlanRequest req, Context cf){
}
}
我的问题是如何修改 GCP 中的代码?如果我想使用 HttpFunction 而不是 RequestHandler 我不应该这样做,因为它不会接受参数。 HttpFunction 也有一个服务方法,但它会再次返回 void,但是我需要返回疫苗接种计划响应...... 我如何在 GCP 中编写以下代码???
public class Handler implements RequestHandler<GetVaccinationPlanRequest, VaccinationPlanResponse>
【问题讨论】:
-
不确定?您想在 GCP 上创建 Java Cloud Functions 并仅稍微更新您的 AWS Lamda 签名,对吗?
-
是的,我想写gcp Cloud函数,需要把上面的代码从aws迁移到GCP。我正在尝试确定如何处理 RequetHandler 并覆盖其方法??
标签: amazon-web-services google-cloud-platform aws-lambda google-cloud-functions