You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
475 B
18 lines
475 B
from fastapi import FastAPI, WebSocket
|
|
from typing import List
|
|
|
|
class WsEvents:
|
|
UNKNOWN = 0
|
|
RESERVED = 1
|
|
SYSSTATS = 2#{"cpu": RandomUtils.getRandom(0.0, 99.9), "mem": RandomUtils.getRandom(0, 400)}
|
|
SPACESTATS = 3#{"free": RandomUtils.getRandom(0, 40), "total": 50, "format": "GB"}
|
|
WIFI = 4#{"state":"", "ap":"", "ip":""}
|
|
|
|
class WsDevice:
|
|
UNKNOWN = 0
|
|
SELF = 1
|
|
EXTERNAL = 2
|
|
|
|
class API_CORE:
|
|
app: FastAPI
|
|
ws_clients: List[WebSocket] = []
|
|
|