mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Annotate some redis.backoff items (#8352)
This commit is contained in:
@@ -1,30 +1,29 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
class AbstractBackoff(ABC):
|
||||
def reset(self): ...
|
||||
def reset(self) -> None: ...
|
||||
@abstractmethod
|
||||
def compute(self, failures): ...
|
||||
def compute(self, failures: int) -> float: ...
|
||||
|
||||
class ConstantBackoff(AbstractBackoff):
|
||||
def __init__(self, backoff) -> None: ...
|
||||
def compute(self, failures): ...
|
||||
def __init__(self, backoff: int) -> None: ...
|
||||
def compute(self, failures: int) -> float: ...
|
||||
|
||||
class NoBackoff(ConstantBackoff):
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class ExponentialBackoff(AbstractBackoff):
|
||||
def __init__(self, cap, base) -> None: ...
|
||||
def compute(self, failures): ...
|
||||
def __init__(self, cap: int, base: int) -> None: ...
|
||||
def compute(self, failures: int) -> float: ...
|
||||
|
||||
class FullJitterBackoff(AbstractBackoff):
|
||||
def __init__(self, cap, base) -> None: ...
|
||||
def compute(self, failures): ...
|
||||
def __init__(self, cap: int, base: int) -> None: ...
|
||||
def compute(self, failures: int) -> float: ...
|
||||
|
||||
class EqualJitterBackoff(AbstractBackoff):
|
||||
def __init__(self, cap, base) -> None: ...
|
||||
def compute(self, failures): ...
|
||||
def __init__(self, cap: int, base: int) -> None: ...
|
||||
def compute(self, failures: int) -> float: ...
|
||||
|
||||
class DecorrelatedJitterBackoff(AbstractBackoff):
|
||||
def __init__(self, cap, base) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def compute(self, failures): ...
|
||||
def __init__(self, cap: int, base: int) -> None: ...
|
||||
def compute(self, failures: int) -> float: ...
|
||||
|
||||
Reference in New Issue
Block a user