Class CommandHealthCheck


  • public class CommandHealthCheck
    extends HealthCheck
    A HealthCheck 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
    • 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 healthcheck
        type - the type of the healthcheck (command)
        command - the command to run
        returnValue - what that command should return if healthy
    • Method Detail

      • getCommand

        public java.lang.String getCommand()
      • getReturnValue

        public java.lang.Integer getReturnValue()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object