Skip to content

Blob store that will read from a remote blob store and cache it to a local one

License

Notifications You must be signed in to change notification settings

examosa/slim-blob-store

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slim-blob-store

Blob store that does the following:

  • Writes to provided local and remote blob stores
  • Uses local blob store as a read cache, with the remote as a fallback
npm install slim-blob-store

Node.js CI

blob-store-compatible

Usage

const slim = require("slim-blob-store");

const blobs = slim(localBlobStore, remoteBlobStore);

const ws = blobs.createWriteStream({ key: "some-key" });
ws.end("hello slim blob!");
// `hello slim blob!` will be written to the local and the remote

blobs.createReadStream({ key: "some-key" }).pipe(process.stdout);
// If `some-key` is already in localBlobStore it will just be read from that one.
// If not it will try and copy it from remoteBlobStore

License

MIT

About

Blob store that will read from a remote blob store and cache it to a local one

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%