콘텐츠로 이동

API: Interface

이 페이지는 Fluxgate 컴포넌트의 동작을 정의하는 핵심 인터페이스를 문서화합니다. 이 인터페이스를 구현하여 자신만의 커스텀 컴포넌트(Window, Tracker, Tripper, Retry, Permit, Listener)를 생성할 수 있습니다.


fluxgate.interfaces.IWindow

Bases: Protocol

record

record(record: Record) -> None
Source code in fluxgate/interfaces.py
17
def record(self, record: Record) -> None: ...

get_metric

get_metric() -> Metric
Source code in fluxgate/interfaces.py
19
def get_metric(self) -> Metric: ...

reset

reset() -> None
Source code in fluxgate/interfaces.py
21
def reset(self) -> None: ...

fluxgate.interfaces.ITracker

Bases: Protocol

__call__

__call__(exception: Exception) -> bool
Source code in fluxgate/interfaces.py
25
def __call__(self, exception: Exception) -> bool: ...

__and__

__and__(other: Self) -> ITracker
Source code in fluxgate/interfaces.py
27
def __and__(self, other: Self) -> ITracker: ...

__or__

__or__(other: Self) -> ITracker
Source code in fluxgate/interfaces.py
29
def __or__(self, other: Self) -> ITracker: ...

__invert__

__invert__() -> ITracker
Source code in fluxgate/interfaces.py
31
def __invert__(self) -> ITracker: ...

fluxgate.interfaces.ITripper

Bases: Protocol

__call__

__call__(
    metric: Metric,
    state: StateEnum,
    consecutive_failures: int,
) -> bool
Source code in fluxgate/interfaces.py
35
36
37
def __call__(
    self, metric: Metric, state: StateEnum, consecutive_failures: int
) -> bool: ...

__and__

__and__(other: Self) -> ITripper
Source code in fluxgate/interfaces.py
39
def __and__(self, other: Self) -> ITripper: ...

__or__

__or__(other: Self) -> ITripper
Source code in fluxgate/interfaces.py
41
def __or__(self, other: Self) -> ITripper: ...

fluxgate.interfaces.IRetry

Bases: Protocol

__call__

__call__(changed_at: float, reopens: int) -> bool
Source code in fluxgate/interfaces.py
45
def __call__(self, changed_at: float, reopens: int) -> bool: ...

fluxgate.interfaces.IPermit

Bases: Protocol

__call__

__call__(changed_at: float) -> bool
Source code in fluxgate/interfaces.py
49
def __call__(self, changed_at: float) -> bool: ...

fluxgate.interfaces.IListener

Bases: Protocol

__call__

__call__(signal: Signal) -> None
Source code in fluxgate/interfaces.py
53
def __call__(self, signal: Signal) -> None: ...

fluxgate.interfaces.IAsyncListener

Bases: Protocol

__call__ async

__call__(signal: Signal) -> None
Source code in fluxgate/interfaces.py
57
async def __call__(self, signal: Signal) -> None: ...