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.
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.
Check out our CONTRIBUTING.md file.