Consul
in package
Integration with a Consul data store.
Table of Contents
- featureRequester() : mixed
- Configures an adapter for reading feature flag data from Consul.
Methods
featureRequester()
Configures an adapter for reading feature flag data from Consul.
public
static featureRequester([array<string|int, mixed> $options = array() ]) : mixed
After calling this method, store its return value in the feature_requester
property of
your client configuration:
$fr = Consul::featureRequester([ "consul_prefix" => "env1" ]);
$config = [ "feature_requester" => $fr ];
$client = new LDClient("sdk_key", $config);
For more about using LaunchDarkly with databases, see the SDK reference guide.
Parameters
- $options : array<string|int, mixed> = array()
-
Configuration settings (can also be passed in the main client configuration):
-
consul_uri
: URI of the Consul host; defaults tohttp://localhost:8500
-
consul_options
: array of settings that the Consul client will pass to Guzzle -
consul_prefix
: a string to be prepended to all database keys; corresponds to the prefix setting in ld-relay -
apc_expiration
: expiration time in seconds for local caching, ifAPCu
is installed
-
Return values
mixed —an object to be stored in the feature_requester
configuration property