summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php')
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php b/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php
new file mode 100644
index 000000000..16909ec6d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+use Throwable;
+
+interface CancellationInterface
+{
+ /**
+ * @param Closure(Throwable): void $callback
+ */
+ public function subscribe(Closure $callback): string;
+
+ public function unsubscribe(string $id): void;
+}