| 65 | |
| 66 | @dataclass |
| 67 | class RPCRequest: |
| 68 | request_id: str |
| 69 | _: KW_ONLY |
| 70 | method_name: str |
| 71 | args: tuple |
| 72 | kwargs: dict |
| 73 | need_response: bool = True |
| 74 | timeout: float = 0.5 |
| 75 | is_streaming: bool = False |
| 76 | creation_timestamp: Optional[ |
| 77 | float] = None # Unix timestamp when request was created |
| 78 | routing_id: Optional[bytes] = None |
| 79 | |
| 80 | def __post_init__(self): |
| 81 | """Initialize creation_timestamp if not provided.""" |
| 82 | if self.creation_timestamp is None: |
| 83 | self.creation_timestamp = time.time() |
| 84 | |
| 85 | |
| 86 | @dataclass |
no outgoing calls
no test coverage detected