RegisterAPI registers all admin REST endpoints on the given router group. fetcher (may be nil) aggregates per-CP live state (sessions/workers) across replicas so the dashboard shows cluster-wide numbers instead of one CP's slice.
(r *gin.RouterGroup, store *configstore.ConfigStore, info OrgStackInfo, fetcher PeerFetcher)
| 80 | // AllWorkerStatuses returns all workers across orgs. |
| 81 | AllWorkerStatuses() []WorkerStatus |
| 82 | // AllSessionStatuses returns all active sessions across orgs. |
| 83 | AllSessionStatuses() []SessionStatus |
| 84 | } |
| 85 | |
| 86 | // RegisterAPI registers all admin REST endpoints on the given router group. |
| 87 | // fetcher (may be nil) aggregates per-CP live state (sessions/workers) across |
| 88 | // replicas so the dashboard shows cluster-wide numbers instead of one CP's slice. |
| 89 | func RegisterAPI(r *gin.RouterGroup, store *configstore.ConfigStore, info OrgStackInfo, fetcher PeerFetcher, awsRegion string) { |
| 90 | registerAPIWithStore(r, newGormAPIStore(store), info, fetcher) |
| 91 | // Generic read-only models explorer (sidebar + table + detail UI). Reads |
| 92 | // the concrete store directly because it needs the runtime schema name and |
| 93 | // raw DB for tables the typed apiStore interface doesn't surface. |
| 94 | registerModelsAPI(r, store) |
no test coverage detected