]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClientInterface.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / liuggio / statsd-php-client / src / Liuggio / StatsdClient / StatsdClientInterface.php
diff --git a/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClientInterface.php b/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClientInterface.php
new file mode 100644 (file)
index 0000000..e2c75cd
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+namespace Liuggio\StatsdClient;
+
+use Liuggio\StatsdClient\Sender\SenderInterface;
+use Liuggio\StatsdClient\Entity\StatsdDataInterface;
+use Liuggio\StatsdClient\Exception\InvalidArgumentException;
+
+Interface StatsdClientInterface
+{
+    const MAX_UDP_SIZE_STR = 512;
+
+    /*
+     * Send the metrics over UDP
+     *
+     * @abstract
+     * @param array|string|StatsdDataInterface  $data message(s) to sent
+     * @param int $sampleRate Tells StatsD that this counter is being sent sampled every Xth of the time.
+     *
+     * @return integer the data sent in bytes
+     */
+    function send($data, $sampleRate = 1);
+}