diff --git a/communicator.py b/communicator.py index 93351a6..a8ad472 100644 --- a/communicator.py +++ b/communicator.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import random import requests from singleton import Singleton @@ -23,21 +24,21 @@ class Communicator(Singleton): :param message: :return: none """ - pass + return None def discoveravailableconsumers(self) -> list: """ Get the list of available consumer from the current primary consumer. :return: """ - pass + return ["10.69.42.1","10.42.69.1","10.10.10.10","10.6.66.1"] def isconsumeravailable(self) -> bool: """ Readiness probe primary consumer. :return: """ - pass + return bool(random.getrandbits(1)) def checkconsumer(self, consumer: str) -> bool: """ @@ -45,4 +46,4 @@ class Communicator(Singleton): :param consumer: :return: """ - pass + return bool(random.getrandbits(1))