Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

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

Package Overview
Dependencies
Maintainers
4
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

## Configure

Source
npmnpm
Version
0.0.0-next-20230915173334
Version published
Weekly downloads
2K
-9.27%
Maintainers
4
Weekly downloads
 
Created
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

Package last updated on 15 Sep 2023

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