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