diff --git a/src/main/kotlin/crablet/query/CrabletQueryApi.kt b/src/main/kotlin/crablet/query/CrabletQueryApi.kt index d5e84b3..248069d 100644 --- a/src/main/kotlin/crablet/query/CrabletQueryApi.kt +++ b/src/main/kotlin/crablet/query/CrabletQueryApi.kt @@ -1,7 +1,6 @@ package crablet.query import crablet.EventName -import crablet.query.impl.SubscriptionCommand import io.vertx.core.Future import io.vertx.core.json.JsonObject import io.vertx.sqlclient.SqlConnection @@ -69,3 +68,10 @@ interface SubscriptionsContainer { command: SubscriptionCommand, ): JsonObject } + +enum class SubscriptionCommand { + TRY_PERFORM_NOW, + PAUSE, + RESUME, + SHOW_STATUS, +} diff --git a/src/main/kotlin/crablet/query/impl/CrabletSubscriptionsContainer.kt b/src/main/kotlin/crablet/query/impl/CrabletSubscriptionsContainer.kt index 72aa9d4..daa336c 100644 --- a/src/main/kotlin/crablet/query/impl/CrabletSubscriptionsContainer.kt +++ b/src/main/kotlin/crablet/query/impl/CrabletSubscriptionsContainer.kt @@ -1,6 +1,7 @@ package crablet.query.impl import crablet.query.IntervalConfig +import crablet.query.SubscriptionCommand import crablet.query.SubscriptionConfig import crablet.query.SubscriptionsContainer import io.vertx.core.DeploymentOptions diff --git a/src/main/kotlin/crablet/query/impl/SubscriptionCommand.kt b/src/main/kotlin/crablet/query/impl/SubscriptionCommand.kt deleted file mode 100644 index a57145c..0000000 --- a/src/main/kotlin/crablet/query/impl/SubscriptionCommand.kt +++ /dev/null @@ -1,8 +0,0 @@ -package crablet.query.impl - -enum class SubscriptionCommand { - TRY_PERFORM_NOW, - PAUSE, - RESUME, - SHOW_STATUS, -} diff --git a/src/main/kotlin/crablet/query/impl/SubscriptionVerticle.kt b/src/main/kotlin/crablet/query/impl/SubscriptionVerticle.kt index 42f55bd..9379cf5 100644 --- a/src/main/kotlin/crablet/query/impl/SubscriptionVerticle.kt +++ b/src/main/kotlin/crablet/query/impl/SubscriptionVerticle.kt @@ -1,11 +1,12 @@ package crablet.query.impl import crablet.query.IntervalConfig +import crablet.query.SubscriptionCommand +import crablet.query.SubscriptionCommand.PAUSE +import crablet.query.SubscriptionCommand.RESUME +import crablet.query.SubscriptionCommand.SHOW_STATUS +import crablet.query.SubscriptionCommand.TRY_PERFORM_NOW import crablet.query.SubscriptionConfig -import crablet.query.impl.SubscriptionCommand.PAUSE -import crablet.query.impl.SubscriptionCommand.RESUME -import crablet.query.impl.SubscriptionCommand.SHOW_STATUS -import crablet.query.impl.SubscriptionCommand.TRY_PERFORM_NOW import io.vertx.core.AbstractVerticle import io.vertx.core.Future import io.vertx.core.eventbus.Message diff --git a/src/test/kotlin/crablet/query/AccountsPgBatchSinkIT.kt b/src/test/kotlin/crablet/query/AccountsPgBatchSinkIT.kt index c6c728f..1fd61d0 100644 --- a/src/test/kotlin/crablet/query/AccountsPgBatchSinkIT.kt +++ b/src/test/kotlin/crablet/query/AccountsPgBatchSinkIT.kt @@ -13,7 +13,6 @@ import crablet.command.TransactionContext import crablet.command.impl.CrabletEventsAppender import crablet.command.impl.CrabletStateBuilder import crablet.query.impl.CrabletSubscriptionsContainer -import crablet.query.impl.SubscriptionCommand import crablet.query.sinks.AccountsPostgresBatchEventSink import io.kotest.matchers.ints.shouldBeExactly import io.kotest.matchers.longs.shouldBeExactly diff --git a/src/test/kotlin/crablet/query/AccountsPgSingleSinkIT.kt b/src/test/kotlin/crablet/query/AccountsPgSingleSinkIT.kt index 3d81a03..7cd095a 100644 --- a/src/test/kotlin/crablet/query/AccountsPgSingleSinkIT.kt +++ b/src/test/kotlin/crablet/query/AccountsPgSingleSinkIT.kt @@ -13,7 +13,6 @@ import crablet.command.TransactionContext import crablet.command.impl.CrabletEventsAppender import crablet.command.impl.CrabletStateBuilder import crablet.query.impl.CrabletSubscriptionsContainer -import crablet.query.impl.SubscriptionCommand import crablet.query.sinks.AccountsPostgresSingleEventSink import io.kotest.matchers.ints.shouldBeExactly import io.kotest.matchers.longs.shouldBeExactly diff --git a/src/test/kotlin/crablet/query/AccountsSingleSinkIT.kt b/src/test/kotlin/crablet/query/AccountsSingleSinkIT.kt index 8d9f6e4..e51d4a4 100644 --- a/src/test/kotlin/crablet/query/AccountsSingleSinkIT.kt +++ b/src/test/kotlin/crablet/query/AccountsSingleSinkIT.kt @@ -13,7 +13,6 @@ import crablet.command.TransactionContext import crablet.command.impl.CrabletEventsAppender import crablet.command.impl.CrabletStateBuilder import crablet.query.impl.CrabletSubscriptionsContainer -import crablet.query.impl.SubscriptionCommand import io.kotest.matchers.ints.shouldBeExactly import io.kotest.matchers.longs.shouldBeExactly import io.kotest.matchers.shouldBe diff --git a/src/test/kotlin/crablet/query/AccountsViewProjectionTest.kt b/src/test/kotlin/crablet/query/AccountsViewProjectionTest.kt index cf4d443..7216bfc 100644 --- a/src/test/kotlin/crablet/query/AccountsViewProjectionTest.kt +++ b/src/test/kotlin/crablet/query/AccountsViewProjectionTest.kt @@ -13,7 +13,6 @@ import crablet.command.TransactionContext import crablet.command.impl.CrabletEventsAppender import crablet.command.impl.CrabletStateBuilder import crablet.query.impl.CrabletSubscriptionsContainer -import crablet.query.impl.SubscriptionCommand import crablet.query.sinks.AccountsPostgresSingleEventSink import io.kotest.matchers.ints.shouldBeExactly import io.kotest.matchers.longs.shouldBeExactly diff --git a/src/test/kotlin/crablet/query/SubscriptionLifecycleIT.kt b/src/test/kotlin/crablet/query/SubscriptionLifecycleIT.kt index eb9d972..81ff385 100644 --- a/src/test/kotlin/crablet/query/SubscriptionLifecycleIT.kt +++ b/src/test/kotlin/crablet/query/SubscriptionLifecycleIT.kt @@ -9,7 +9,6 @@ import crablet.command.AppendCondition import crablet.command.impl.CrabletEventsAppender import crablet.command.impl.CrabletStateBuilder import crablet.query.impl.CrabletSubscriptionsContainer -import crablet.query.impl.SubscriptionCommand import io.kotest.matchers.ints.shouldBeExactly import io.kotest.matchers.longs.shouldBeExactly import io.kotest.matchers.nulls.shouldNotBeNull