ping_viewer_next/server/mod.rs
1pub mod manager;
2pub mod protocols;
3
4// The Server module consists of a manager and all available layers that provide access to internal services.
5//
6// Manager:
7// The Manager module requires a DeviceManagerHandler, which will be used to forward all incoming requests.
8// This allows the Manager to receive and process requests from RestAPI and WebSocket methods.
9// The requests are forwarded to the DeviceManager using the server's AppData, which holds a clone of the DeviceManager's Handler and will provide the responses.
10//
11// Front-end:
12// The frontend provides access to REST API documentation through {address}/docs with a Swagger interface and the API specifications.
13//
14// RestAPI:
15// The REST API will have a default route and versioned routes.
16// To keep the application stable through updates, users can use {address}/v{x}/route.
17//
18// WebSocket:
19// WebSocket is provided via the {address}/ws route.
20// Users can use the following queries:
21// ?filter="some_desired_string_to_use_regex"
22// ?device-number="00000000-0000-0000-b9c0-f5752d453eb3" // The UUID provided by the source of the device created
23// Otherwise, if they are not defined, the WebSocket channel will receive all available messages.
24// All operations made through REST API and WebSocket routes will be broadcast to all clients subscribed to device-number=null (default),
25// except for errors, which are forwarded directly to the requester.