Class Client

java.lang.Object
org.jgroups.protocols.kubernetes.Client

public class Client extends Object
Author:
Ales Justin
  • Field Details

    • masterUrl

      protected final String masterUrl
    • headers

      protected final Map<String,String> headers
    • connectTimeout

      protected final int connectTimeout
    • readTimeout

      protected final int readTimeout
    • operationAttempts

      protected final int operationAttempts
    • operationSleep

      protected final long operationSleep
    • streamProvider

      protected final StreamProvider streamProvider
    • info

      protected final String info
    • log

      protected final org.jgroups.logging.Log log
  • Constructor Details

    • Client

      public Client(String masterUrl, Map<String,String> headers, int connectTimeout, int readTimeout, int operationAttempts, long operationSleep, StreamProvider streamProvider, org.jgroups.logging.Log log)
  • Method Details

    • info

      public String info()
    • fetchFromKubernetes

      protected String fetchFromKubernetes(String op, String namespace, String labels, boolean dump_requests) throws Exception
      Throws:
      Exception
    • getPods

      public List<Pod> getPods(String namespace, String labels, boolean dump_requests) throws Exception
      Throws:
      Exception
    • parseJsonResult

      protected List<Pod> parseJsonResult(String input, String namespace, String labels)
    • podRunning

      protected boolean podRunning(jakarta.json.JsonObject podStatus)
      Helper method to determine if a pod is considered running or not.
      Parameters:
      podStatus - a JsonObject expected to contain the "status" object of a pod
      Returns:
      true if the pod is considered available, false otherwise