@rivetkit/redis
Version:
_Lightweight Libraries for Backends_
25 lines (22 loc) • 1.37 kB
TypeScript
import { RegistryConfig, Encoding } from '@rivetkit/core';
import { ManagerDriver, GetForIdInput, ActorOutput, GetWithKeyInput, GetOrCreateWithKeyInput, CreateInput } from '@rivetkit/core/driver-helpers';
import { Context } from 'hono';
import Redis from 'ioredis';
import { R as RedisDriverConfig, N as Node } from './types-CaJ2qnDX.js';
import 'zod';
import '@rivetkit/core/client';
declare class RedisManagerDriver implements ManagerDriver {
#private;
constructor(registryConfig: RegistryConfig, driverConfig: RedisDriverConfig, redis: Redis);
get node(): Node;
set node(node: Node);
getForId({ actorId }: GetForIdInput): Promise<ActorOutput | undefined>;
getWithKey({ name, key, }: GetWithKeyInput): Promise<ActorOutput | undefined>;
getOrCreateWithKey(input: GetOrCreateWithKeyInput): Promise<ActorOutput>;
createActor({ name, key, input }: CreateInput): Promise<ActorOutput>;
sendRequest(actorId: string, actorRequest: Request): Promise<Response>;
openWebSocket(path: string, actorId: string, encoding: Encoding, connParams: unknown): Promise<WebSocket>;
proxyRequest(c: Context, actorRequest: Request, actorId: string): Promise<Response>;
proxyWebSocket(c: Context, path: string, actorId: string, encoding: Encoding, connParams: unknown, authData: unknown): Promise<Response>;
}
export { RedisManagerDriver };