aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/core/rest/NoServiceDiscovery.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/xyz/driver/core/rest/NoServiceDiscovery.scala')
-rw-r--r--src/main/scala/xyz/driver/core/rest/NoServiceDiscovery.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/core/rest/NoServiceDiscovery.scala b/src/main/scala/xyz/driver/core/rest/NoServiceDiscovery.scala
new file mode 100644
index 0000000..9d2febd
--- /dev/null
+++ b/src/main/scala/xyz/driver/core/rest/NoServiceDiscovery.scala
@@ -0,0 +1,9 @@
+package xyz.driver.core.rest
+
+import xyz.driver.core.Name
+
+class NoServiceDiscovery extends ServiceDiscovery with SavingUsedServiceDiscovery {
+
+ def discover[T <: Service](serviceName: Name[Service]): T =
+ throw new IllegalArgumentException(s"Service with name $serviceName is unknown")
+}