implement project and machine registries

This commit is contained in:
kami
2026-07-26 19:01:44 +04:00
parent 0a21e1bc2b
commit 7980839393
4 changed files with 211 additions and 6 deletions
+6
View File
@@ -5,6 +5,7 @@ import (
"log"
"net/http"
"orchestra/internal/domain"
"orchestra/internal/registry"
"orchestra/internal/store"
"os"
"strconv"
@@ -22,6 +23,11 @@ func main() {
if err != nil {
log.Fatal(err)
}
if config := os.Getenv("ORCHESTRA_CONFIG"); config != "" {
if _, err := registry.Load(config); err != nil {
log.Fatalf("load orchestra config: %v", err)
}
}
mux := http.NewServeMux()
mux.HandleFunc("/v1/tasks", func(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {