gitscope
https://dev.kronoz.win/r/marzneshin.git
app/marznode/base.py · v0.3.2
Source
1 12b255b Dawsh 2y ago from abc import ABC
2 12b255b Dawsh 2y ago
3 12b255b Dawsh 2y ago
4 12b255b Dawsh 2y ago class MarzNodeBase(ABC):
5 12b255b Dawsh 2y ago
6 f1ab16c Dawsh 2y ago async def update_user(
7 f1ab16c Dawsh 2y ago self, user, inbounds: list[str] | None = None
8 f1ab16c Dawsh 2y ago ) -> None:
9 f6a32ea Dawsh 2y ago """updates a user on the node"""
10 12b255b Dawsh 2y ago
11 12b255b Dawsh 2y ago async def fetch_users_stats(self):
12 12b255b Dawsh 2y ago """get user stats from the node"""
13 12b255b Dawsh 2y ago
14 12b255b Dawsh 2y ago async def is_alive(self) -> bool:
15 12b255b Dawsh 2y ago """
16 12b255b Dawsh 2y ago checks if node is up and running and connected
17 12b255b Dawsh 2y ago :return: True if the node is responsive, otherwise False
18 12b255b Dawsh 2y ago """