wiki.techinc.nl/tests/phpunit/unit/includes/Settings/Source/fixtures
Dan Duvall 4f4c831111 Support etcd as a source for SettingsLoader
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
2022-06-21 17:17:32 +00:00
..
dir.json
etcd Support etcd as a source for SettingsLoader 2022-06-21 17:17:32 +00:00
bad.txt tests: Rename fixtures/bad.json 2022-04-20 15:17:36 +01:00
settings.json
strategies-bad-structure.php
strategies.php