3 namespace MediaWiki\Api\Hook
;
6 * This is a hook handler interface, see docs/Hooks.md.
7 * Use the hook name "ApiMaxLagInfo" to register handlers implementing this interface.
12 interface ApiMaxLagInfoHook
{
14 * This hook is called when lag information is being requested via API. Use this hook
15 * to override lag information. Generally a hook function should only replace
16 * $lagInfo if the new $lagInfo['lag'] is greater than the current $lagInfo['lag'].
20 * @param array &$lagInfo Maximum lag information array. Fields in the array are:
21 * - `lag`: number of seconds of lag
22 * - `host`: host name on which the lag exists
23 * - `type`: an indication of the type of lag. For example: "db" for database
24 * replication lag or "jobqueue" for job queue size converted to pseudo-seconds
26 * You can also add more fields that are returned to the user in the API response.
27 * @return void This hook must not abort, it must return no value
29 public function onApiMaxLagInfo( &$lagInfo ): void
;