【发布时间】:2021-08-16 02:58:00
【问题描述】:
我在 Google Cloud Platform 上创建了 Redis。我的应用程序正在连接。但是,我不能在我创建的客户端中设置、获取、打开。问题是什么?因为它不在里面。那我要怎么管理呢?
const connectRedis = async () => {
const { CloudRedisClient } = require('@google-cloud/redis')
const thisClient = new CloudRedisClient()
const formattedParent = thisClient.locationPath('project', 'location')
const thisRequest = {
parent: formattedParent
}
const thisResponse = (await thisClient.listInstances(thisRequest))[0]
}
thisClient.on || thisClient.on 未找到。
【问题讨论】:
-
我赞成这个。如何使用 google cloud redis 获取和设置值?还是我不明白这是如何工作的?注意:提供的示例是文档中唯一的示例。
标签: node.js google-cloud-platform redis