New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

etcd_cached

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

etcd_cached

Cached access to etcd

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

This package gives very easy access to etcd, with local cache.

##Installation

npm install etcd_cached

##Initialization

var EtcdCache = require('etcd_cached');
var etcd = new EtcdCache("URL", 60);

The constructor has 2 arguments:

  • URL: the URL of the etcd directory
  • TTL: the TTL for the cache. Use 0 for infinite;

##Registration

To add a value to a key:

etcd.register("Key", "Value", (err) => {

});

##De-registration

To remove a key:

etcd.deRegister("Key", (err) => {

});

##Getting a value

To get a value for a key:

etcd.get("Key", (val, err) => {

});

FAQs

Package last updated on 18 Jun 2016

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