Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add health checks #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
41 changes: 41 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>


<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
Expand Down Expand Up @@ -70,10 +79,42 @@
<properties>
<feign-version>6.1.3</feign-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<github.global.server>github</github.global.server>
</properties>

<build>
<plugins>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
<includes><include>**/*</include></includes>
<merge>true</merge> <!-- don't delete old artifacts -->
<repositoryName>marathon-client</repositoryName> <!-- github repo name -->
<repositoryOwner>willroden</repositoryOwner> <!-- github username -->
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/mesosphere/marathon/client/model/v2/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class App {
private Collection<Task> tasks;
private Integer tasksStaged;
private Integer tasksRunning;
private Collection<HealthCheck> healthChecks;

public String getId() {
return id;
Expand Down Expand Up @@ -160,6 +161,14 @@ public void setTasksRunning(Integer tasksRunning) {
this.tasksRunning = tasksRunning;
}

public Collection<HealthCheck> getHealthChecks() {
return healthChecks;
}

public void setHealthChecks(Collection<HealthCheck> healthChecks) {
this.healthChecks = healthChecks;
}

@Override
public String toString() {
return ModelUtils.toString(this);
Expand Down
67 changes: 67 additions & 0 deletions src/main/java/mesosphere/marathon/client/model/v2/HealthCheck.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package mesosphere.marathon.client.model.v2;

public class HealthCheck {
private String path;
private String protocol;
private Integer portIndex;
private Integer gracePeriodSeconds;
private Integer intervalSeconds;
private Integer timeoutSeconds;
private Integer maxConsecutiveFailures;

public String getPath() {
return path;
}

public void setPath(String path) {
this.path = path;
}

public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

public Integer getPortIndex() {
return portIndex;
}

public void setPortIndex(Integer portIndex) {
this.portIndex = portIndex;
}

public Integer getGracePeriodSeconds() {
return gracePeriodSeconds;
}

public void setGracePeriodSeconds(Integer gracePeriodSeconds) {
this.gracePeriodSeconds = gracePeriodSeconds;
}

public Integer getIntervalSeconds() {
return intervalSeconds;
}

public void setIntervalSeconds(Integer intervalSeconds) {
this.intervalSeconds = intervalSeconds;
}

public Integer getTimeoutSeconds() {
return timeoutSeconds;
}

public void setTimeoutSeconds(Integer timeoutSeconds) {
this.timeoutSeconds = timeoutSeconds;
}

public Integer getMaxConsecutiveFailures() {
return maxConsecutiveFailures;
}

public void setMaxConsecutiveFailures(Integer maxConsecutiveFailures) {
this.maxConsecutiveFailures = maxConsecutiveFailures;
}
}