注意:在未来的几个月内,我们将会重新整理 App Engine 文档网站,使得查找内容更轻松,并更好地与其他 Google Cloud 产品保持一致。将会提供相同的内容,但导航现在将与其余的 Cloud 产品相一致。
Python 2 不再受社区支持。我们建议您
将 Python 2 应用迁移到 Python 3。
描述符模块函数(实验性)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
protorpc.remote
软件包提供以下函数:
- is_error_status(status)
-
确定 RPC 状态是否出错。
参数
- 状态
- 将要进行错误状态检查的初始化 RpcStatus 消息。
- check_rpc_status(status)
-
将错误状态转换为一个引发的异常。
参数
- 状态
- 将要进行错误状态检查的初始化 RpcStatus 消息。
如果 status
的状态为错误,则会引发RpcError。
- method(request_type=message_types.VoidMessage, response_type=message_types.VoidMessage)
-
修饰某个方法使其成为远程方法。
参数
- request_type=message_types.VoidMessage
- 预期请求的消息类型。
- response_type=message_types.VoidMessage
- 预期响应的消息类型。
返回修饰后的远程方法。该远程方法包含具有以下属性的 remote
属性:
- 方法
- 原始的、未修饰的方法
- request_type
- 预期请求的消息类型。
- response_type
- 预期响应的消息类型。
如果 request_type
或 response_type
参数不是适当的消息子类,则会引发TypeError。
- get_remote_method(method)
-
对于远程方法,会返回远程方法信息对象,否则返回 None。
参数
- 方法
- 要获取的方法。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2021-01-17。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]