API: Interfaces¶
This page documents the core interfaces that define the behavior of Fluxgate's components. You can implement these interfaces to create your own custom components (windows, trackers, trippers, retries, permits, and listeners).
fluxgate.interfaces.IWindow
¶
fluxgate.interfaces.ITracker
¶
Bases: Protocol
__call__
¶
__call__(exception: Exception) -> bool
Source code in fluxgate/interfaces.py
25 | |
__and__
¶
__and__(other: Self) -> ITracker
Source code in fluxgate/interfaces.py
27 | |
fluxgate.interfaces.ITripper
¶
Bases: Protocol
__call__
¶
__call__(
metric: Metric,
state: StateEnum,
consecutive_failures: int,
) -> bool
Source code in fluxgate/interfaces.py
35 36 37 | |
fluxgate.interfaces.IRetry
¶
Bases: Protocol
__call__
¶
__call__(changed_at: float, reopens: int) -> bool
Source code in fluxgate/interfaces.py
45 | |
fluxgate.interfaces.IPermit
¶
Bases: Protocol
__call__
¶
__call__(changed_at: float) -> bool
Source code in fluxgate/interfaces.py
49 | |