Source code for edri.config.constant

from enum import IntEnum, unique, auto

__all__ = ["ApiType"]


SWITCH_MAX_SIZE = 0xFFFFFFFF  # Ceiling of the frame's 4-byte length field

# Maximum single poll() wait for the scheduler, in seconds. Connection.poll()
# converts the timeout to milliseconds and hands it to the OS poll/select, where
# it must fit a C int — the ceiling is INT_MAX ms = 2_147_483_647 ms, i.e.
# exactly 2_147_483.647 s. Anything larger raises OverflowError.
SCHEDULER_TIMEOUT_MAX = 2_147_483.647


[docs] @unique class ApiType(IntEnum): WS = 0 REST = auto() HTML = auto() GRPC = auto()