@Test public void providesOriginStatus() { metricRegistry.register("origins.app.app-01.status", gauge("active")); DashboardData.Origin origin = newDashboardData().downstream().firstBackend().firstOrigin(); eventBus.post(new OriginsSnapshot(id("app"), singleton(pool(origin("app", "app-01", "localhost", 9090))), emptyList(), emptyList())); assertThat(origin.status(), is("active")); }
@JsonProperty("downstream") public Downstream downstream() { return downstream; }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); @JsonProperty("server") Server server(); @JsonProperty("downstream") Downstream downstream(); @JsonProperty("publishTime") long publishTime(); }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); @JsonProperty("server") Server server(); @JsonProperty("downstream") Downstream downstream(); @JsonProperty("publishTime") long publishTime();  }