diff --git a/cluster-http/src/main/scala/akka/management/cluster/scaladsl/ClusterHttpManagementRoutes.scala b/cluster-http/src/main/scala/akka/management/cluster/scaladsl/ClusterHttpManagementRoutes.scala index 305465cec..8426c61f7 100644 --- a/cluster-http/src/main/scala/akka/management/cluster/scaladsl/ClusterHttpManagementRoutes.scala +++ b/cluster-http/src/main/scala/akka/management/cluster/scaladsl/ClusterHttpManagementRoutes.scala @@ -8,6 +8,7 @@ import akka.cluster.sharding.{ ClusterSharding, ShardRegion } import akka.cluster.{ Cluster, Member, MemberStatus } import akka.http.scaladsl.model.{ HttpMethod, HttpMethods, StatusCodes, Uri } import Uri.Path +import akka.actor.ClassicActorSystemProvider import akka.http.scaladsl.server.Route import akka.management.cluster._ import akka.pattern.ask @@ -248,6 +249,13 @@ object ClusterHttpManagementRoutes extends ClusterHttpManagementJsonProtocol { } } + /** + * Creates an instance of [[ClusterHttpManagementRoutes]] to manage the cluster for the given + * typed or classic actor system instance. This version does not provide Basic Authentication. + */ + def apply(actorySystemProvider: ClassicActorSystemProvider): Route = + apply(Cluster(actorySystemProvider.classicSystem)) + /** * Creates an instance of [[ClusterHttpManagementRoutes]] to manage the specified * [[akka.cluster.Cluster]] instance. This version does not provide Basic Authentication. @@ -291,6 +299,12 @@ object ClusterHttpManagementRoutes extends ClusterHttpManagementJsonProtocol { } } + /** + * Creates an instance of [[ClusterHttpManagementRoutes]] with only the read only routes. + */ + def readOnly(actorySystemProvider: ClassicActorSystemProvider): Route = + readOnly(Cluster(actorySystemProvider.classicSystem)) + /** * Creates an instance of [[ClusterHttpManagementRoutes]] with only the read only routes. */