27 lines
592 B
Go
27 lines
592 B
Go
package controlplane
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
type statusResponse struct {
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Boundaries []string `json:"boundaries"`
|
|
}
|
|
|
|
func Register(mux *http.ServeMux) {
|
|
mux.HandleFunc("GET /v1/status", func(writer http.ResponseWriter, _ *http.Request) {
|
|
writer.Header().Set("Content-Type", "application/json")
|
|
_ = json.NewEncoder(writer).Encode(statusResponse{
|
|
Name: "RARA",
|
|
Version: "0.1.0",
|
|
Boundaries: []string{
|
|
"control-plane",
|
|
"rag-data-plane",
|
|
"adaptation-plane",
|
|
},
|
|
})
|
|
})
|
|
}
|