aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2021-12-02 13:00:35 +0100
committerMartin Polden <mpolden@mpolden.no>2021-12-02 13:00:35 +0100
commitfd85e9ef612a3f2ddd488024226d98378068f1fe (patch)
tree94299ec52bc1dd1c69057468acf8404ee1c8b9fa /controller-api
parent67e6aba2d5591463d1d3bbe72944d36ab1a713b8 (diff)
Stop sending reason for status change
No longer exposed in API.
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/EndpointStatus.java58
1 files changed, 22 insertions, 36 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/EndpointStatus.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/EndpointStatus.java
index 2f1b93158ab..4b326bc7430 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/EndpointStatus.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/EndpointStatus.java
@@ -1,59 +1,45 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.application.v4.model;
+import java.time.Instant;
+import java.util.Objects;
+
/**
- * Represent the operational status of a service endpoint (where the endpoint itself
- * is identified by the container cluster id).
- *
- * The status of an endpoint may be assigned from the controller.
+ * Represent the routing status for all endpoints of a deployment.
*
* @author smorgrav
*/
public class EndpointStatus {
+
private final String agent;
- private final String reason;
private final Status status;
- private final long epoch;
+ private final Instant changedAt;
- public enum Status {
- in,
- out,
- unknown;
+ public EndpointStatus(Status status, String agent, Instant changedAt) {
+ this.status = Objects.requireNonNull(status);
+ this.agent = Objects.requireNonNull(agent);
+ this.changedAt = Objects.requireNonNull(changedAt);
}
- public EndpointStatus(Status status, String reason, String agent, long epoch) {
- this.status = status;
- this.reason = reason;
- this.agent = agent;
- this.epoch = epoch;
- }
-
- /**
- * @return The agent responsible setting this status
- */
- public String getAgent() {
+ /** Returns the agent responsible setting this status */
+ public String agent() {
return agent;
}
- /**
- * @return The reason for this status (e.g. 'incident INCXXX')
- */
- public String getReason() {
- return reason;
+ /** Returns the current status */
+ public Status status() {
+ return status;
}
- /**
- * @return The current status
- */
- public Status getStatus() {
- return status;
+ /** Returns when this was last changed */
+ public Instant changedAt() {
+ return changedAt;
}
- /**
- * @return The epoch for when this status became active, in seconds
- */
- public long getEpoch() {
- return epoch;
+ public enum Status {
+ in,
+ out,
+ unknown;
}
}