New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

distack

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

distack

Distributed Storage Stack

1.0.1
Source
npm
Version published
Maintainers
1
Created
Source

Distributed Storage Stack

Read and write to multiple storage systems through one simple API. Currently supports serial and parallel writes to:

  • Amazon S3
  • Local disk

Installation

npm install distack

Quick Start

var DSS = require('distack');

// init
var store = new DSS({
    {
        'tag' : 'local',
        'type': 'Disk',
        'cfg' : {...}
    },
    {
        'tag' : 'cloud',
        'type': 'S3',
        'cfg' : {...}
    }
});

// write
store.write(['local', 'cloud'], 'myKey', 'my/file', function (err) {...});

// read
try {
  var readStream = store.read('local', 'myKey');
} catch(e) {...}

Storage services

Amazon S3

var store = new DSS({
    {
        'tag' : 'cloud',
        'type': 'S3',
        'cfg' : {
            'key'   : '<ACCESS_KEY>',
            'secret': '<SECRET>',
            'region': '<REGION>1',
            'bucket': '<BUCKET_NAME>'
        }
    }
});

Local Disk Storage

var store = new DSS({
    {
        'tag' : 'local',
        'type': 'Disk',
        'cfg' : {
            'basedir': './uploads'
        }
    }
});

License

MIT

Keywords

distributed

FAQs

Package last updated on 10 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts