Add instance management handlers for starting, stopping, updating, and retrieving instances

This commit is contained in:
2025-07-18 23:41:25 +02:00
parent 4c6f08009a
commit 0e6be2b0a4
4 changed files with 162 additions and 48 deletions

View File

@@ -31,12 +31,12 @@ func SetupRouter(handler *Handler) *chi.Mux {
r.Route("/{id}", func(r chi.Router) {
// Instance management
// r.Get("/", handler.GetInstance()) // Get instance details
// r.Put("/", handler.UpdateInstance()) // Update instance configuration
r.Get("/", handler.GetInstance()) // Get instance details
r.Put("/", handler.UpdateInstance()) // Update instance configuration
// r.Delete("/", handler.DeleteInstance()) // Stop and remove instance
// r.Post("/start", handler.StartInstance()) // Start stopped instance
// r.Post("/stop", handler.StopInstance()) // Stop running instance
// r.Post("/restart", handler.RestartInstance()) // Restart instance
r.Post("/start", handler.StartInstance()) // Start stopped instance
r.Post("/stop", handler.StopInstance()) // Stop running instance
r.Post("/restart", handler.RestartInstance()) // Restart instance
// r.Get("/logs", handler.GetInstanceLogs()) // Get instance logs
// Llama.cpp server proxy endpoints (proxied to the actual llama.cpp server)