Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Api\Hook;
4
5/**
6 * This is a hook handler interface, see docs/Hooks.md.
7 * Use the hook name "ApiMaxLagInfo" to register handlers implementing this interface.
8 *
9 * @stable to implement
10 * @ingroup Hooks
11 */
12interface ApiMaxLagInfoHook {
13    /**
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'].
17     *
18     * @since 1.35
19     *
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
25     *
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
28     */
29    public function onApiMaxLagInfo( &$lagInfo ): void;
30}