UNPKG

@cn-shell/storage-engine

Version:

A Cloud Native Shell extension for stoarge engine using LevelDB

19 lines (18 loc) 585 B
import CNShell from "cn-shell"; export declare class CNStorageEngine extends CNShell { private _storageDir; private _keepOpenInterval; private _closeStorageTimer; private _stores; constructor(name: string); start(): Promise<boolean>; stop(): Promise<void>; healthCheck(): Promise<boolean>; private checkStorage; private setupCreateRoute; private setupReadRoute; private getStore; get(name: string, key: string): Promise<string | null>; write(name: string, key: string, value: string): Promise<boolean>; del(name: string, key: string): Promise<boolean>; }