Package org.jgroups.protocols.kubernetes
Class Client
java.lang.Object
org.jgroups.protocols.kubernetes.Client
- Author:
- Ales Justin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final Stringprotected final org.jgroups.logging.Logprotected final Stringprotected final intprotected final longprotected final intprotected final StreamProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringfetchFromKubernetes(String op, String namespace, String labels, boolean dump_requests) info()parseJsonResult(String input, String namespace, String labels) protected booleanpodRunning(jakarta.json.JsonObject podStatus) Helper method to determine if a pod is considered running or not.
-
Field Details
-
masterUrl
-
headers
-
connectTimeout
protected final int connectTimeout -
readTimeout
protected final int readTimeout -
operationAttempts
protected final int operationAttempts -
operationSleep
protected final long operationSleep -
streamProvider
-
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
-
fetchFromKubernetes
protected String fetchFromKubernetes(String op, String namespace, String labels, boolean dump_requests) throws Exception - Throws:
Exception
-
getPods
- Throws:
Exception
-
parseJsonResult
-
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
-