@skaile/connector-redis
v0.1.0
Published
Redis connector for @skaile/workspaces
Downloads
373
Readme
@skaile/connector-redis
A Redis (KeyDB / Valkey) connector for
@skaile/workspaces. It
exposes a key-value store to the agent through the connector tool face:
get / set / keys / del / ttl / info.
This connector ships separately so the core runtime no longer bundles
ioredis. Install it as a plugin when you need Redis.
Install
skaile plugin install @skaile/connector-redisAdd it to skaile.yaml:
plugins:
- "@skaile/connector-redis@^0.1.0"
connectors:
- id: cache
driver: redis
access: read-write
auth: env:REDIS_URL
options:
namespace: myappConfig / auth
| Field | Where | Notes |
|---|---|---|
| url | auth (e.g. env:REDIS_URL) or options.url | Redis connection URL, e.g. redis://localhost:6379. Required. |
| namespace | options.namespace | Optional key prefix applied to all operations. |
The connection URL is resolved from ctx.resolvedFields.url, then the
declaration auth ref via the secrets chain, then options.url.
Operations
| Operation | Access | Description |
|---|---|---|
| get | read | Get value by key |
| set | write | Set a key-value pair with optional TTL |
| keys | read | List keys matching a glob pattern |
| del | write | Delete one or more keys |
| ttl | read | Get remaining time-to-live for a key |
| info | read | Get Redis server info |
How it works
- Lazily imports
ioredisat connect time, so the dependency is only loaded when a Redis connector is actually used. - Registers a
redisconnector target into the unifiedpluginRegistryvia the exportedregister(registry).
