File tree 1 file changed +14
-0
lines changed 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ func (s *Server) Serve() error {
125
125
}
126
126
127
127
// always available public routes go here (none at the moment)
128
+ router .HandleFunc ("/configurator/status" , s .GetStatus )
128
129
129
130
s .Handler = router
130
131
return s .ListenAndServe ()
@@ -225,6 +226,19 @@ func (s *Server) loadTargets() {
225
226
}
226
227
}
227
228
229
+ func (s * Server ) GetStatus (w http.ResponseWriter , r * http.Request ) {
230
+ w .Header ().Set ("Content-Type" , "application/json" )
231
+ data := map [string ]any {
232
+ "code" : 200 ,
233
+ "message" : "Configurator is healthy" ,
234
+ }
235
+ err := json .NewEncoder (w ).Encode (data )
236
+ if err != nil {
237
+ fmt .Printf ("failed to encode JSON: %v\n " , err )
238
+ return
239
+ }
240
+ }
241
+
228
242
// Create a new target with name, generator, templates, and files.
229
243
//
230
244
// Example:
You can’t perform that action at this time.
0 commit comments