Class KubernetesMembershipProvider
java.lang.Object
org.apache.catalina.tribes.membership.MembershipProviderBase
org.apache.catalina.tribes.membership.cloud.CloudMembershipProvider
org.apache.catalina.tribes.membership.cloud.KubernetesMembershipProvider
- All Implemented Interfaces:
ChannelListener
,Heartbeat
,MembershipProvider
A
MembershipProvider
that uses Kubernetes API to retrieve the members of a
cluster.-
Field Summary
Fields inherited from class org.apache.catalina.tribes.membership.cloud.CloudMembershipProvider
connectionTimeout, CUSTOM_ENV_PREFIX, expirationTime, headers, localIp, md5, port, readTimeout, sm, startTime, streamProvider, url
Fields inherited from class org.apache.catalina.tribes.membership.MembershipProviderBase
executor, membership, membershipListener, service
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.catalina.tribes.membership.cloud.CloudMembershipProvider
accept, getEnv, getNamespace, heartbeat, init, messageReceived, updateMember
Methods inherited from class org.apache.catalina.tribes.membership.MembershipProviderBase
getMember, getMembers, hasMembers, setMembershipListener, setMembershipService
-
Constructor Details
-
KubernetesMembershipProvider
public KubernetesMembershipProvider()
-
-
Method Details
-
start
Description copied from interface:MembershipProvider
Start the membership provider.- Specified by:
start
in interfaceMembershipProvider
- Overrides:
start
in classCloudMembershipProvider
- Parameters:
level
- the readiness level
Channel.DEFAULT - will start all services
Channel.MBR_RX_SEQ - starts the membership receiver
Channel.MBR_TX_SEQ - starts the membership broadcaster- Throws:
Exception
- if an error occurs
-
stop
Description copied from interface:MembershipProvider
Stop the membership provider.- Specified by:
stop
in interfaceMembershipProvider
- Overrides:
stop
in classCloudMembershipProvider
- Parameters:
level
- the readiness level
Channel.DEFAULT - will stop all services
Channel.MBR_RX_SEQ - stops the membership receiver
Channel.MBR_TX_SEQ - stops the membership broadcaster- Returns:
true
if successful- Throws:
Exception
- if an error occurs
-
fetchMembers
Description copied from class:CloudMembershipProvider
Fetch current cluster members from the cloud orchestration.- Specified by:
fetchMembers
in classCloudMembershipProvider
- Returns:
- the member array
-
parsePods
-