Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.apache.pekko.management

import org.apache.pekko
import pekko.actor.ExtendedActorSystem
import pekko.actor.{ ActorSystem, ClassicActorSystemProvider, ExtendedActorSystem, ExtensionId, ExtensionIdProvider }
import pekko.annotation.InternalApi
import pekko.http.scaladsl.model._
import pekko.http.scaladsl.server.Directives._
Expand Down Expand Up @@ -47,7 +47,12 @@ private[pekko] class HealthCheckRoutes(system: ExtendedActorSystem) extends Mana
StatusCodes.InternalServerError -> s"Health Check Failed: ${t.getMessage}")
}

override def routes(mrps: ManagementRouteProviderSettings): Route = {
override def routes(mrps: ManagementRouteProviderSettings): Route = routes()

/**
* @since 1.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.1.0 was already released so we need to decide whether this can go in 1.1.1 or if we need a 1.2.0 before this can be released

Copy link
Member

@pjfanning pjfanning Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not much point changing this yet - but I will block the merge until we can discuss how to eventually release this (which affects which branch we can use)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes sure, let me know if I am needed for any part in the discussion.

*/
def routes(): Route = {
concat(
path(PathMatchers.separateOnSlashes(settings.startupPath)) {
get {
Expand All @@ -66,3 +71,16 @@ private[pekko] class HealthCheckRoutes(system: ExtendedActorSystem) extends Mana
})
}
}

/**
* @since 1.1.0
*/
object HealthCheckRoutes extends ExtensionId[HealthCheckRoutes] with ExtensionIdProvider {
override def get(system: ActorSystem): HealthCheckRoutes = super.get(system)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returning it here means HealthCheckRoutes is becoming public API, so we should remove the 'internal' markers.


override def get(system: ClassicActorSystemProvider): HealthCheckRoutes = super.get(system)

override def lookup: HealthCheckRoutes.type = HealthCheckRoutes

override def createExtension(system: ExtendedActorSystem): HealthCheckRoutes = new HealthCheckRoutes(system)
}