Socket
Socket
Sign inDemoInstall

@scalecube/scalecube-discovery

Package Overview
Dependencies
4
Maintainers
7
Versions
275
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @scalecube/scalecube-discovery

[![Join the chat at https://gitter.im/scalecube-js/Lobby](https://badges.gitter.im/scalecube-js/Lobby.svg)](https://gitter.im/scalecube-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)


Version published
Maintainers
7
Created

Readme

Source

Join the chat at https://gitter.im/scalecube-js/Lobby

This is part of scalecube-js project, see more at https://github.com/scalecube/scalecube-js
Full documentation

Discovery

This package provides a default discovery implementation. it is intended to publish and discover any data in a distributed environment.

Basic Usage

import { createDiscovery } from '@scalecube/scalecube-discovery';

const discoveryConfig = {
  seedAddress,
  address,
  itemsToPublish: [],
};

const discovery = createDiscovery(discoveryConfig);

// on subscribe to `discoveredItems$()`, we will start getting emits of the distributed environment's latest state.
discovery.discoveredItems$().subscribe(console.log); 


// on calling `destroy()`, we will remove our metadata from the distributed environment. 
// also, it stops the discovery from sharing/publishing metadata.
discovery.destroy().then(console.log); 

FAQs

Last updated on 11 Aug 2021

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