Documentation
    Preparing search index...

    Module tachyon-drive-node-fs

    tachyon-drive-node-fs

    TypeScript npm version Maintainability Code Coverage github action

    const driver = new FileStorageDriver(
    "FileStorageDriver",
    "./store.json",
    bufferSerializer,
    );
    const processor = new CryptoBufferProcessor(Buffer.from("some-secret-key"));
    const driver = new FileStorageDriver(
    {
    name: "FileStorageDriver",
    fileName: "./store.json.aes",
    logger: console,
    },
    bufferSerializer,
    processor,
    );
    const fileUpdateNotify = new FileUpdateNotify("./store.notify");
    const driver = new SomeDriver(
    { name: "SomeDriverWithoutUpdateNotification" },
    bufferSerializer,
    fileUpdateNotify,
    );
    //  includes common strToBufferSerializer
    const jsonSerialization: IPersistSerializer<Data, string> = {
    deserialize: (buffer: string) => JSON.parse(buffer.toString()),
    serialize: (data: Data) => JSON.stringify(data),
    validator: (data: Data) => dataSchema.safeParse(data).success,
    };

    const bufferSerializer: IPersistSerializer<Data, Buffer> = nextSerializer<
    Data,
    string,
    Buffer
    >(jsonSerialization, strToBufferSerializer);

    Classes

    CryptoBufferProcessor
    FileStorageDriver
    FileUpdateNotify

    Type Aliases

    FileStorageDriverOptions

    Variables

    strToBufferSerializer