1.3 KiB
1.3 KiB
Business Logic Model — Unit 03: Availability Module
Dit document beschrijft de processen voor beschikbaarheidscontrole.
1. Availability Middleware Flow
graph TD
A[Inkomend Request] --> B{Is Endpoint /status?}
B -- Ja --> C[Laat door naar Controller]
B -- Nee --> D{Check Status via IAvailabilityService}
D --> E{Status == Available?}
E -- Ja --> C
E -- Nee --> F{Status == Maintenance?}
F -- Ja --> G{Heeft Rol Admin/Owner?}
G -- Ja --> C
G -- Nee --> H[Retourneer 503 + ApiErrorResponse]
F -- Nee --> H
2. Status Check Flow
- Client roept
GET /api/availability/statusaan. - AvailabilityController roept
IAvailabilityService.IsAvailableAsync()aan. - Service haalt status op (in MVP uit config of in-memory state).
- Controller bouwt response:
{ "status": "Available", "checkedAt": "2026-06-12T01:15:00Z", "message": "System is running normally." }
3. Remote Shutdown Logic (Toekomst)
Hoewel de MVP een stub gebruikt, is het logic model voorbereid op een externe trigger:
- Een administratieve actie zet een vlag in de database/cache.
- De
IAvailabilityServicedetecteert deze wijziging. - De Middleware reageert direct op alle volgende requests.