module
redis
Source: index.
The redis package has the following named exports:
CloudRedisClient- Reference to v1.CloudRedisClientv1- This is used for selecting or pinning a particular backend service version. It exports:CloudRedisClient- Reference to v1.CloudRedisClient
Examples
Install the client library with <a href="https://www.npmjs.com/">npm</a>:
npm install --save redis
Import the client library:
const redis = require('redis');
Create a client that uses <a href="https://goo.gl/64dyYX">Application Default Credentials (ADC)</a>:
const client = new redis.CloudRedisClient();
Create a client with <a href="https://goo.gl/RXp6VL">explicit credentials</a>:
const client = new redis.CloudRedisClient({
projectId: 'your-project-id',
keyFilename: '/path/to/keyfile.json',
});
Exports
require("redis") unknown
Property
| Name | Type | Optional | Description |
|---|---|---|---|
|
CloudRedisClient |
|
|
Reference to v1beta1.CloudRedisClient |
Properties
static
v1 object
Property
| Name | Type | Optional | Description |
|---|---|---|---|
|
CloudRedisClient |
constructor |
|
Reference to v1.CloudRedisClient |
static
v1beta1 object
Property
| Name | Type | Optional | Description |
|---|---|---|---|
|
CloudRedisClient |
constructor |
|
Reference to v1beta1.CloudRedisClient |