Compare commits

..

2 Commits

Author SHA1 Message Date
06671e29b8
Merge branch 'master' of gitea:GoldenPogacsa/producer
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-29 18:26:22 +02:00
ef47d7d6d3
mock real behaviour 2020-03-29 18:26:19 +02:00

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
import random
import requests import requests
from singleton import Singleton from singleton import Singleton
@ -23,21 +24,21 @@ class Communicator(Singleton):
:param message: :param message:
:return: none :return: none
""" """
pass return None
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:
""" """
pass return ["10.69.42.1","10.42.69.1","10.10.10.10","10.6.66.1"]
def isconsumeravailable(self) -> bool: def isconsumeravailable(self) -> bool:
""" """
Readiness probe primary consumer. Readiness probe primary consumer.
:return: :return:
""" """
pass return bool(random.getrandbits(1))
def checkconsumer(self, consumer: str) -> bool: def checkconsumer(self, consumer: str) -> bool:
""" """
@ -45,4 +46,4 @@ class Communicator(Singleton):
:param consumer: :param consumer:
:return: :return:
""" """
pass return bool(random.getrandbits(1))