3 changed files with 42 additions and 2 deletions
@ -1,4 +1,18 @@ |
|||||
from fastapi import FastAPI |
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: |
class API_CORE: |
||||
app: FastAPI |
app: FastAPI |
||||
|
ws_clients: List[WebSocket] = [] |
||||
|
|||||
Loading…
Reference in new issue