Compare commits
No commits in common. "06671e29b827015bc21ea09d2ba84177a3a9ce9a" and "39c34f2a677d4882818f6f52a7141f28683a6cf8" have entirely different histories.
06671e29b8
...
39c34f2a67
@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import random
|
|
||||||
import requests
|
import requests
|
||||||
from singleton import Singleton
|
from singleton import Singleton
|
||||||
|
|
||||||
@ -24,21 +23,21 @@ class Communicator(Singleton):
|
|||||||
:param message:
|
:param message:
|
||||||
:return: none
|
:return: none
|
||||||
"""
|
"""
|
||||||
return None
|
pass
|
||||||
|
|
||||||
def discoveravailableconsumers(self) -> list:
|
def discoveravailableconsumers(self) -> list:
|
||||||
"""
|
"""
|
||||||
Get the list of available consumer from the current primary consumer.
|
Get the list of available consumer from the current primary consumer.
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
return ["10.69.42.1","10.42.69.1","10.10.10.10","10.6.66.1"]
|
pass
|
||||||
|
|
||||||
def isconsumeravailable(self) -> bool:
|
def isconsumeravailable(self) -> bool:
|
||||||
"""
|
"""
|
||||||
Readiness probe primary consumer.
|
Readiness probe primary consumer.
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
return bool(random.getrandbits(1))
|
pass
|
||||||
|
|
||||||
def checkconsumer(self, consumer: str) -> bool:
|
def checkconsumer(self, consumer: str) -> bool:
|
||||||
"""
|
"""
|
||||||
@ -46,4 +45,4 @@ class Communicator(Singleton):
|
|||||||
:param consumer:
|
:param consumer:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
return bool(random.getrandbits(1))
|
pass
|
||||||
|
Reference in New Issue
Block a user