检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
46 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
42 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
39 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
37 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
约束与限制 只有当DCS缓存实例处于“运行中”或“故障”状态,才能执行此操作。 单机实例或关闭了AOF持久化(参数appendonly配置为no)的主备、集群、读写分离实例,在重启实例后,实例中原有的数据将被清空,请谨慎操作。 在重启DCS缓存实例过程中,您无法对实例进行读写操作。
弹性云服务器操作系统,这里以Window为例。 在弹性云服务器安装VS 2017社区版。 启动VS 2017,新建一个工程,工程名自定义,这里设置为“redisdemo”。 导入go-redis的依赖包,在终端输入go get github.com/go-redis/redis。 图1 终端输入
39 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
38 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
38 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
41 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
38 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
43 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
37 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
9:00:00。 password 否 String 缓存实例的认证信息。 说明: 当“no_password_access”配置为“false”或未配置时,请求消息中须包含password参数。 Redis类型的缓存实例密码复杂度要求: 输入长度为8到64位的字符串。 不能使用正序或逆序用户名作为密码。
下建议: 网络连接配置 敏感数据加密后存储在Redis实例,且实例不开启公网访问。 对于敏感数据,尽量加密后存储。如无特殊需要,尽量不使用公网访问。 对安全组设置有限的、必须的允许访问规则。 安全组与VPC均是用于网络安全访问控制的配置,以端口最少放开原则配置安全组规则,降低网络入侵风险。
38 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
38 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
38 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
38 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s
39 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dcs "github.com/huaweicloud/huaweicloud-s