Added a EtcdSource to handle loading of settings from etcd. The implementation is based on EtcdConfig but is much simpler due to the reliance on the existing source caching layer. GuzzleHttp\Client is used over MultiHttpClient as the latter depends on MediaWikiServices and therefore should not be used during early initialization. A naive cache key is based on the etcd request URL, effectively representing the etcd API version and settings directory, and uses either the DNS SRV entry as the host name or the host name itself if discovery is disabled. The cache TTL is set to 10 seconds. The combination of this low TTL and the naive key should replicate the current caching pattern of EtcdConfig. Stale results are allowed for failover in case of temporary unavailability. At this time, the expiry weight was not changed from the suggested 1.0. However, verification of this as a suitable early expiration coefficient should be performed in a production like environment. Bug: T296771 Change-Id: I782f4ee567a986fd23df1a84aec629e648a29066 |
||
|---|---|---|
| .. | ||
| dir.json | ||
| etcd | ||
| bad.txt | ||
| settings.json | ||
| strategies-bad-structure.php | ||
| strategies.php | ||