@colyseus/core
Version:
Multiplayer Framework for Node.js.
18 lines (17 loc) • 768 B
TypeScript
import type { IRoomCache, SortOptions, MatchMakerDriver } from '../driver.ts';
export type { IRoomCache, SortOptions, MatchMakerDriver };
export declare class LocalDriver implements MatchMakerDriver {
rooms: IRoomCache[];
has(roomId: string): boolean;
query(conditions: Partial<IRoomCache>, sortOptions?: SortOptions): IRoomCache<any>[];
cleanup(processId: string): Promise<void>;
findOne(conditions: Partial<IRoomCache>, sortOptions?: SortOptions): Promise<IRoomCache>;
update(room: IRoomCache, operations: Partial<{
$set: Partial<IRoomCache>;
$inc: Partial<IRoomCache>;
}>): boolean;
persist(room: IRoomCache, create?: boolean): boolean;
remove(roomId: string): boolean;
clear(): void;
shutdown(): void;
}