Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into 0.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
gchudnov committed Sep 9, 2022
2 parents c196a46 + 4d38d7d commit 4537ba3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
nakadi:
image: docker.pkg.github.com/adyach/nakadi-docker/nakadi:latest
image: adyach/nakadi-docker:3.3.8
ports:
- "8080:8080"
depends_on:
Expand Down
7 changes: 6 additions & 1 deletion src/main/scala/org/zalando/kanadi/api/Subscriptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1625,12 +1625,17 @@ case class Subscriptions(baseUri: URI, oAuth2TokenProvider: Option[OAuth2TokenPr
* operational troubleshooting and log analysis.
* @return
*/
def stats(subscriptionId: SubscriptionId)(implicit
def stats(subscriptionId: SubscriptionId, showTimeLag: Boolean = false)(implicit
flowId: FlowId = randomFlowId(),
executionContext: ExecutionContext
): Future[Option[SubscriptionStats]] = {
val showTimeLagQuery: Query = if (showTimeLag) {
Query("show_time_lag" -> showTimeLag.toString)
} else Query.Empty

val uri = baseUri_
.withPath(baseUri_.path / "subscriptions" / subscriptionId.id.toString / "stats")
.withQuery(showTimeLagQuery)

for {
headers <- oAuth2TokenProvider match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ trait SubscriptionsInterface {

def closeHttpConnection(subscriptionId: SubscriptionId, streamId: StreamId): Boolean

def stats(subscriptionId: SubscriptionId)(implicit
def stats(subscriptionId: SubscriptionId, showTimeLag: Boolean = false)(implicit
flowId: FlowId = randomFlowId(),
executionContext: ExecutionContext
): Future[Option[SubscriptionStats]]
Expand Down

0 comments on commit 4537ba3

Please sign in to comment.