Constructor
new AllowListPolicy(childPolicy, allowList)
Create a new policy that wraps the provided child policy but only "allow" hosts from the provided list.
Parameters:
| Name | Type | Description |
|---|---|---|
childPolicy |
LoadBalancingPolicy | the wrapped policy. If the child policy filters some of the hosts out, only hosts present in allow list and accepted by child policy will be contacted by the driver. |
allowList |
Array.<string> | The hosts address in the format ipAddress:port. Only hosts from this list may get connected to (whether they will get connected to or not depends on the child policy). |
- Source:
Extends
- LoadBalancingPolicy
Methods
getOptions()
Gets an associative array containing the policy options.
- Source:
getRustConfiguration() → {LoadBalancingConfig}
- Source:
Returns:
- Type
- LoadBalancingConfig