Class CommandHealthCheck
- java.lang.Object
-
- uk.co.ractf.polaris.api.common.JsonRepresentable
-
- uk.co.ractf.polaris.api.healthcheck.HealthCheck
-
- uk.co.ractf.polaris.api.healthcheck.CommandHealthCheck
-
public class CommandHealthCheck extends HealthCheck
AHealthCheck
that runs a command inside a pod, returns healthy if the given return value is returned.{ "id": "cmdhealth1", "type": "command", "command": "ls -la", "returnValue": 0 }
-
-
Constructor Summary
Constructors Constructor Description CommandHealthCheck(java.lang.String id, java.lang.String type, java.lang.String command, java.lang.Integer returnValue)
Create a CommandHealthCheck
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getCommand()
java.lang.Integer
getReturnValue()
int
hashCode()
-
Methods inherited from class uk.co.ractf.polaris.api.healthcheck.HealthCheck
getId
-
Methods inherited from class uk.co.ractf.polaris.api.common.JsonRepresentable
parse, toJsonString
-
-
-
-
Constructor Detail
-
CommandHealthCheck
@Contract(pure=true) public CommandHealthCheck(java.lang.String id, java.lang.String type, java.lang.String command, java.lang.Integer returnValue)
Create a CommandHealthCheck- Parameters:
id
- the id of the healthchecktype
- the type of the healthcheck (command)command
- the command to runreturnValue
- what that command should return if healthy
-
-