【问题标题】:@google-cloud/redis get and set not found@google-cloud/redis 获取和设置未找到
【发布时间】: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


【解决方案1】:

@google-cloud/redis 库仅供管理员使用。它不是客户。

在此处查看讨论:

https://github.com/googleapis/nodejs-redis/issues/386

【讨论】:

    猜你喜欢
    • 2012-06-10
    • 1970-01-01
    • 2015-10-01
    • 2022-11-11
    • 1970-01-01
    • 2020-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多