Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.16 KB

File metadata and controls

28 lines (20 loc) · 1.16 KB

NodeJS ServiceHub Framework

This NPM package provides a way to proffer and consume brokered services. It is used in Visual Studio-related products to exchange services within and across processes and even across machines.

Learn about the brokered services essentials, how to provide a brokered service, and how to consume a brokered service.

Usage

Given an instance of IServiceBroker, you can request a service (such as a simple calculator service) like this:

const proxy = await serviceBroker.getProxy<ICalculatorService>(CalculatorDescriptor);
try {
    if (proxy) {
        const sum = await proxy.add(3, 5);
        assert(sum == 8);
    }
} finally {
    proxy?.dispose();
}

Learn more on our doc site.

Contributing

Check out our CONTRIBUTING.md file.