def __init__(self, func, *, loop, check_ttl=DEFAULT_CHECK_TTL,
                 check_timeout=DEFAULT_CHECK_TIMEOUT):
        """
        :param func: callable object which returns awaitable object, where
            result is one of: ``True`` (healthy), ``False`` (unhealthy), or
            ``None`` (unknown)
        :param loop: asyncio-compatible event loop
        :param check_ttl: how long we can cache result of the previous check
        :param check_timeout: timeout for this check
        """
        self._func = func
        self._check_ttl = check_ttl
        self._check_timeout = check_timeout

        self._events = set()

        self._check_lock = asyncio.Event(loop=loop)
        self._check_lock.set()

        self._check_wrapper = DeadlineWrapper()
def __init__ ( self , func , * , loop , check_ttl = DEFAULT_CHECK_TTL , check_timeout = DEFAULT_CHECK_TIMEOUT ) : self . _func = func self . _check_ttl = check_ttl self . _check_timeout = check_timeout self . _events = set ( ) self . _check_lock = asyncio . Event ( loop = loop ) self . _check_lock . set ( ) self . _check_wrapper = DeadlineWrapper ( )
:param func: callable object which returns awaitable object, where
            result is one of: ``True`` (healthy), ``False`` (unhealthy), or
            ``None`` (unknown)
        :param loop: asyncio-compatible event loop
        :param check_ttl: how long we can cache result of the previous check
        :param check_timeout: timeout for this check