lib/InstanceProvider.js
/**
 * Instance Provider Constructor
 *
 * @param serviceDiscovery      {ServiceDiscovery} Service Discovery Instance
 * @param serviceName           {String}           Name of the service
 * @param selectionStrategy     {String}           Instance selection strategy. Random or RoundRobin
 *
 * @public
 * @constructor InstanceProvider
 */
Instance Provider Constructor
@param serviceDiscovery      {ServiceDiscovery} Service Discovery Instance
@param serviceName           {String}           Name of the service
@param selectionStrategy     {String}           Instance selection strategy.


Instance Provider Constructor @param serviceDiscovery { ServiceDiscovery } Service Discovery Instance @param serviceName { String } Name of the service @param selectionStrategy { String } Instance selection strategy .
function InstanceProvider(serviceDiscovery, serviceName, selectionStrategy) {
    this.serviceDiscovery = serviceDiscovery;
    this.serviceName = serviceName;
    this.selectionStrategy = selectionStrategy || 'RoundRobin';
    this.lastInstanceIndex = 0;
    this.dataStore = new DataStore();
}
function InstanceProvider ( serviceDiscovery , serviceName , selectionStrategy ) { this . serviceDiscovery = serviceDiscovery ; this . serviceName = serviceName ; this . selectionStrategy = selectionStrategy || 'RoundRobin' ; this . lastInstanceIndex = 0 ; this . dataStore = new DataStore ( ) ; }
Instance Provider Constructor
 @param serviceDiscovery      {ServiceDiscovery} Service Discovery Instance
 @param serviceName           {String}           Name of the service
 @param selectionStrategy     {String}           Instance selection strategy.
Instance Provider Constructor @param serviceDiscovery { ServiceDiscovery } Service Discovery Instance @param serviceName { String } Name of the service @param selectionStrategy { String } Instance selection strategy .