google-cloud-platform - GCP:使用 x-google-backend 参数配置云 ESPv2 端点
问题描述
我正在使用带有云运行后端服务的 gcp 云端点。我的问题是后端配置了 15 秒的默认超时。这就是为什么我想设置openAPI“x-google-backend”截止时间参数来增加端点的超时时间:(https://cloud.google.com/endpoints/docs/openapi/openapi-extensions)
目前我正在为我的端点使用以下 grpc 服务配置。
https://cloud.google.com/endpoints/docs/grpc/grpc-service-config
这种配置不支持 openAPI 扩展。现在我正在寻找一种将 grpc 配置与 openAPI 结合起来的方法。我读过可以为一个端点发布多个配置文件。
解决方案
好的,这种配置效果很好。
type: google.api.Service
config_version: 3
name: ${cloud_run_hostname_endpoint}
title: ${endpoint_title}
apis:
- name: my_endpoint_name
usage:
rules:
# No APIs can be called without an API Key
- selector: "*"
allow_unregistered_calls: false
backend:
rules:
- selector: "*"
address: grpcs://${cloud_run_hostname_backend}
deadline: 300.0
接受期限参数。
推荐阅读
- python - 根据另一个df的几个条件设置df的列值
- javascript - browser.storage.local 值被覆盖而不是附加到
- list - 如何使垂直堆叠的卡片颤动?
- python - 在使用 PyQt 并为某些小部件设置样式表时,如何找到可以更改的 qss 参数?
- python - 如何计算 statsmodels TTestIndPower solve_power 函数的 effect_size
- javascript - 如何在 $location 参数更改时禁用页面跳转?
- php - 如何使用 PHP 中的用户定义变量更改 HTML 文档上的某些文本?
- javascript - 使用 lodash 根据来自两个不同数组的数据过滤数组
- javascript - DELETE 在 Express/Postgres 中没有按预期工作
- android - React Native :app:transformDexArchiveWithExternalLibsDexMergerForDebug Android 构建中的错误