Socket
Socket
Sign inDemoInstall

@equinor/fusion-framework-module-service-discovery

Package Overview
Dependencies
4
Maintainers
0
Versions
153
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-framework-module-service-discovery

## Configure


Version published
Weekly downloads
1.4K
increased by47.44%
Maintainers
0
Created
Weekly downloads
 

Readme

Source

Fusion Service Provider

Configure


/** configure the client which should fetch service descriptions */ 
config.http.configureClient('my_service_discovery', {
  baseUri: 'https://foo.bar',
  defaultScopes: ['321312bab2-3213123bb-321312aa2/.default'],
});

/** key of configured http client, default `service_discovery` */
config.serviceDiscovery.clientKey = 'my_service_discovery'

/** endpoint for fetching services */
config.serviceDiscovery.uri = 'api/services';

/** parse http response to service discovery environment */
config.serviceDiscovery.selector = async (response: Response): Promise<Environment> => {
  const services = await response.json() as Service[];
  return services.reduce((acc, service) => Object.assign(acc, {[service.key]: service}), {});
}

FAQs

Last updated on 09 Jul 2024

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc