File tree Expand file tree Collapse file tree 3 files changed +0
-48
lines changed Expand file tree Collapse file tree 3 files changed +0
-48
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,6 @@ processes = []
1414 timeout = " 10s"
1515 type = " http"
1616
17- [checks .role ]
18- grace_period = " 30s"
19- interval = " 15s"
20- method = " get"
21- path = " /flycheck/role"
22- port = 5500
23- timeout = " 10s"
24- type = " http"
25-
2617 [checks .vm ]
2718 grace_period = " 1s"
2819 interval = " 1m"
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ const Port = 5500
1515func StartCheckListener () {
1616 http .HandleFunc ("/flycheck/vm" , runVMChecks )
1717 http .HandleFunc ("/flycheck/pg" , runPGChecks )
18- http .HandleFunc ("/flycheck/role" , runRoleCheck )
1918
2019 fmt .Printf ("Listening on port %d" , Port )
2120 http .ListenAndServe (fmt .Sprintf (":%d" , Port ), nil )
@@ -59,28 +58,6 @@ func runPGChecks(w http.ResponseWriter, r *http.Request) {
5958 }
6059}
6160
62- func runRoleCheck (w http.ResponseWriter , r * http.Request ) {
63- ctx , cancel := context .WithTimeout (r .Context (), (time .Second * 5 ))
64- defer cancel ()
65-
66- suite := & su.CheckSuite {Name : "Role" }
67- suite , err := PostgreSQLRole (ctx , suite )
68- if err != nil {
69- suite .ErrOnSetup = err
70- cancel ()
71- }
72-
73- go func () {
74- suite .Process (ctx )
75- cancel ()
76- }()
77-
78- select {
79- case <- ctx .Done ():
80- handleCheckResponse (w , suite , true )
81- }
82- }
83-
8461func handleCheckResponse (w http.ResponseWriter , suite * su.CheckSuite , raw bool ) {
8562 if suite .ErrOnSetup != nil {
8663 handleError (w , suite .ErrOnSetup )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments