Service brokers
This guide explains how to associate an Itential Platform service with a broker.
What brokering does
Associating a service with an IP broker means the service agrees to implement the broker’s interface — that is, the service supplies a particular set of functions declared by the broker. For example, a broker named trope might support functions foo, bar, and baz. A service that implements the trope broker must define all three functions. If it does not, an error will occur at runtime when the brokering system calls a missing function.
Brokering allows services to be used conceptually to perform operations. Consider an example called the device broker with functions such as addDevice, getDevice, and deleteDevice. If three different services talk to three different network managers and all can perform these operations, you can associate them all with the device broker. You can then reference the concept of a device — rather than a specific service — to perform those operations.
Associate a broker
To associate a service with one or more brokers, add it to the brokers array in pronghorn.json. Add the brokers array at the root of the configuration if it does not exist. In the following example, the device and method brokers are added:
When the service is installed in Itential Platform, the broker associations are added to the service configuration automatically: