MediaWiki
master
|
Settings loaded from an etcd server. More...
Public Member Functions | |
__construct (array $params=[], ?callable $mapper=null, ?Client $client=null, ?callable $resolver=null) | |
Constructs a new EtcdSource for the given etcd server details. More... | |
__toString () | |
Returns this etcd source as a string. More... | |
allowsStaleLoad () | |
Allow stale results from etcd sources in case all servers become temporarily unavailable. More... | |
getExpiryTtl () | |
The cache expiry TTL (in seconds) for this source. More... | |
getExpiryWeight () | |
Coefficient used in determining early expiration of cached settings to avoid stampedes. More... | |
getHashKey () | |
Returns a naive hash key for use in caching based on an etcd request URL constructed using the etcd request URL. More... | |
load () | |
Loads and returns settings from the etcd server. More... | |
MediaWiki\Settings\Source\EtcdSource::__construct | ( | array | $params = [] , |
?callable | $mapper = null , |
||
?Client | $client = null , |
||
?callable | $resolver = null |
||
) |
Constructs a new EtcdSource for the given etcd server details.
array | $params | Parameter map:
|
?callable | $mapper Function that maps etcd entries to valid MediaWiki config/schema/php-ini values. Defaults to simply returning the structure stored in etcd. Signature: function ( array $settings ): array | |
?Client | $client Guzzle HTTP client used to query etcd. | |
?callable | $resolver Function that must return an array of server hostname/port pairs to try. The default resolver will either:
|
SettingsBuilderException | if the given host is invalid. |
Definition at line 89 of file EtcdSource.php.
MediaWiki\Settings\Source\EtcdSource::__toString | ( | ) |
MediaWiki\Settings\Source\EtcdSource::allowsStaleLoad | ( | ) |
Allow stale results from etcd sources in case all servers become temporarily unavailable.
Implements MediaWiki\Settings\Cache\CacheableSource.
Definition at line 149 of file EtcdSource.php.
MediaWiki\Settings\Source\EtcdSource::getExpiryTtl | ( | ) |
The cache expiry TTL (in seconds) for this source.
Implements MediaWiki\Settings\Cache\CacheableSource.
Definition at line 184 of file EtcdSource.php.
MediaWiki\Settings\Source\EtcdSource::getExpiryWeight | ( | ) |
Coefficient used in determining early expiration of cached settings to avoid stampedes.
Implements MediaWiki\Settings\Cache\CacheableSource.
Definition at line 194 of file EtcdSource.php.
MediaWiki\Settings\Source\EtcdSource::getHashKey | ( | ) |
Returns a naive hash key for use in caching based on an etcd request URL constructed using the etcd request URL.
In the case where SRV discovery is performed, the host in the URL will be the SRV record name.
Implements MediaWiki\Settings\Cache\CacheableSource.
Definition at line 206 of file EtcdSource.php.
MediaWiki\Settings\Source\EtcdSource::load | ( | ) |
Loads and returns settings from the etcd server.
SettingsBuilderException |
Implements MediaWiki\Settings\Source\SettingsSource.
Definition at line 159 of file EtcdSource.php.