问题描述
我正在使用带有云运行后端服务的 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 扩展。现在我正在寻找一种组合方式 使用 openAPI 的 grpc 配置。我了解到可以为一个端点发布多个配置文件。
因此,将不胜感激任何形式的帮助。
非常感谢,祝好 乔恩
解决方法
好的,这种配置效果很好。
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
接受截止日期参数。