检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
连接DCS单机、主备、读写分离、Proxy集群实例 from redis.backoff import ExponentialBackoff from redis.retry import Retry from redis.client import Redis from redis
连接DCS集群实例 from redis.cluster import RedisCluster as Redis from redis.cluster import ClusterNode redis_client = None def create_redis_client(context):
200 - 响应正文包含函数名称、函数版本和处理程序名称。 其他为错误请求 示例响应正文 { "traceId": "3da1f2dc-3222-475e-9205-e2e6c6318895", "invokedFunctionUrn": "sn:cn:yrk:1
(1)函数中的IP地址为LTS的接入点,获取接入点IP方法如下: 登录云日志服务 LTS控制台,在左侧导航栏选择“主机管理 > 主机”; 在页面右上方,单击“安装ICAgent”; 在弹出的“安装ICAgent”窗口中获取接入点IP。 图1 接入点IP (2)函数中的log_gr
示例代码 连接DCS单机、主备、读写分离、Proxy集群实例 连接DCS集群实例 代码解读 父主题: 使用FunctionGraph函数访问Redis数据
Pm8XZInGi3QgBpRhEOBcVoptUdCsS6KNQ+Mfbqko4xIhVyoGCaHh4eD/WT0GUzg2UCa7Z3pj4RLngX28Ik3jnYzyHJqmkx3cH7pjL253B54UjjfzDcYWhoCsMOVI6YP55+89exuG5vnb
"executions" : [ { "workflow_id" : "c0aecc37-8b78-4fc5-81af-14af495dc053", "execution_id" : "41c25eec-a1ba-4789-9851-eaead00cd6b9",
"requestContext": { "apiId": "bc1dcffd-aa35-474d-897c-d53425a4c08e", "requestId": "11cdcdcf33949dc6d722640a13091c77", "stage":
"requestContext": { "apiId": "bc1dcffd-aa35-474d-897c-d53425a4c08e", "requestId": "11cdcdcf33949dc6d722640a13091c77", "stage":
能大幅度降低暂时性故障影响。例如:发生瞬时的网络抖动、磁盘抖动导致服务暂时不可用或者调用超时的情况下,提高Redis操作的成功概率。 连接DCS单机、主备、读写分离、Proxy集群实例添加Retry配置,退避策略为指数退避(ExponentialBackoff),重试次数上限为3
mRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=" } access_key secret_key
wUEEG/yo6B4vEXcshyBG+lb437kfNFpEWhATrQmqGTkYVH0Pit8FEdCqM6VQtSGncxYPpPz5O3fgFUEsBAh4DCgAAAAgA9DUzWA0iY8usAAAAAQEAAAgAAAAAAAAAAAAAAPMCAAAAAGl
CreateFunctionRequest{} enabledCustomImage:= true imageCustomImage:= "swr.xxx" customImagebody := &model.CustomImage{ Enabled: &enabledCustomImage, Image:
"4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3", "owner" : "*****", "link" : "https://{bucket}.{obs_endpoint}/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3
"4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3", "owner" : "*****", "link" : "https://{bucket}.{obs_endpoint}/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3
"4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3", "owner" : "*****", "link" : "https://{bucket}.{obs_endpoint}/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3
"4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3", "owner" : "*****", "link" : "https://{bukcet}.{obs_endpoint}/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3
"digest": "decbce6939297b0b5ec6d1a23bf9c725870f5e69fc338a89a6a4029264688dc26338f56d08b6535de47f15ad538e22ca66613b9a46f807d50b687bb53fded1c6",
"4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3", "owner" : "*****", "link" : "https://{bucket}.{obs_endpoint}/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3
"" enterpriseProjectIdCreateFunctionAppRequestBody:= "0" descriptionCreateFunctionAppRequestBody:= "应用程序测试" templateIdCreateFunctionAppRequestBody:=