Socket
Socket
Sign inDemoInstall

etcd-register

Package Overview
Dependencies
40
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    etcd-register

register service config to etcd


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

etcd-register

Build Status npm Github Releases

API

register

const EtcdRegister = require('etcd-register');
const client = new EtcdRegister({
	key: 'backend',
	host: '127.0.0.1',
	port: 2379
});

client.set({
	ip: '192.168.1.1',
	port: 80,
	host: 'test.com',
	prefix: '/albi'
});
client.ttl(600);
client.addTag('http-backend', 'app-albi', 'http-ping');
client.register();

list

const EtcdRegister = require('etcd-register');
const client = new EtcdRegister({
	key: 'backend',
	host: '127.0.0.1',
	port: 2379
});
client.list('backend:http').then(data => {
	console.info(data);
});

refresh

const EtcdRegister = require('etcd-register');
const client = new EtcdRegister({
	key: 'backend',
	host: '127.0.0.1',
	port: 2379
});

client.set({
	ip: '192.168.1.1',
	port: 80,
	host: 'test.com',
	prefix: '/albi'
});
client.ttl(600);
client.addTag('http-backend', 'app-albi', 'http-ping');
client.register();
setTimeout(() => {
	client.refresh();
}, 60 * 1000);

License

MIT

Keywords

FAQs

Last updated on 21 Oct 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc