Package org.hcjf.io.net.kubernetes
Class KubernetesSpyConsumer
- java.lang.Object
-
- org.hcjf.io.net.kubernetes.KubernetesSpyConsumer
-
- All Implemented Interfaces:
ServiceConsumer
public abstract class KubernetesSpyConsumer extends java.lang.Object implements ServiceConsumer
- Author:
- javaito
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceKubernetesSpyConsumer.PodMatcherThis kind of matcher verify the conditions over the pod instance.static interfaceKubernetesSpyConsumer.ServiceMatcherThis kind of matcher verify the conditions over the service instance.
-
Constructor Summary
Constructors Constructor Description KubernetesSpyConsumer()KubernetesSpyConsumer(KubernetesSpyConsumer.PodMatcher podMatcher)KubernetesSpyConsumer(KubernetesSpyConsumer.PodMatcher podMatcher, KubernetesSpyConsumer.ServiceMatcher serviceMatcher)KubernetesSpyConsumer(KubernetesSpyConsumer.ServiceMatcher serviceMatcher)
-
Method Summary
Modifier and Type Method Description protected voidonPodDiscovery(io.kubernetes.client.models.V1Pod pod)This method is called when a new pod is discovery.protected voidonPodLost(io.kubernetes.client.models.V1Pod pod)This method is called when a pod is not more into the kubernetes cluster.protected voidonServiceDiscovery(io.kubernetes.client.models.V1Service service)This method is called when a new service is discovery.protected voidonServiceLost(io.kubernetes.client.models.V1Service service)This method is called when a service is not more into the kubernetes cluster.voidupdatePods(io.kubernetes.client.models.V1PodList podList)This method is called periodically indicating all the current pod instances into the kubernetes cluster.voidupdateServices(io.kubernetes.client.models.V1ServiceList serviceList)This method is called periodically indicating all the current service instances into the kubernetes cluster.
-
-
-
Constructor Detail
-
KubernetesSpyConsumer
public KubernetesSpyConsumer(KubernetesSpyConsumer.PodMatcher podMatcher, KubernetesSpyConsumer.ServiceMatcher serviceMatcher)
-
KubernetesSpyConsumer
public KubernetesSpyConsumer(KubernetesSpyConsumer.PodMatcher podMatcher)
-
KubernetesSpyConsumer
public KubernetesSpyConsumer(KubernetesSpyConsumer.ServiceMatcher serviceMatcher)
-
KubernetesSpyConsumer
public KubernetesSpyConsumer()
-
-
Method Detail
-
updatePods
public final void updatePods(io.kubernetes.client.models.V1PodList podList)
This method is called periodically indicating all the current pod instances into the kubernetes cluster.- Parameters:
podList- List of current pods.
-
updateServices
public final void updateServices(io.kubernetes.client.models.V1ServiceList serviceList)
This method is called periodically indicating all the current service instances into the kubernetes cluster.- Parameters:
serviceList- List of the current services.
-
onPodDiscovery
protected void onPodDiscovery(io.kubernetes.client.models.V1Pod pod)
This method is called when a new pod is discovery.- Parameters:
pod- Discovery pod instance.
-
onPodLost
protected void onPodLost(io.kubernetes.client.models.V1Pod pod)
This method is called when a pod is not more into the kubernetes cluster.- Parameters:
pod- Lost pod instance.
-
onServiceDiscovery
protected void onServiceDiscovery(io.kubernetes.client.models.V1Service service)
This method is called when a new service is discovery.- Parameters:
service- Discovery service instance.
-
onServiceLost
protected void onServiceLost(io.kubernetes.client.models.V1Service service)
This method is called when a service is not more into the kubernetes cluster.- Parameters:
service- Lost service instance.
-
-