server: allow router to report child instances sleep status (#20849)

* server: allow router to report child instances sleep status

* refactor

* move sleeping to state

* nits
This commit is contained in:
Xuan-Son Nguyen
2026-03-22 18:33:52 +01:00
committed by GitHub
parent bd3f1d9d65
commit 49bfddeca1
7 changed files with 102 additions and 43 deletions
+4
View File
@@ -74,6 +74,10 @@ struct server_context {
// get server metadata (read-only), can only be called after load_model()
// not thread-safe, should only be used from the main thread
server_context_meta get_meta() const;
// register a callback to be called when sleeping state changes
// must be set before load_model() is called
void on_sleeping_changed(std::function<void(bool)> callback);
};