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