Skip to content

Commit 6744dae

Browse files
Shaun DavisShaun Davis
authored andcommitted
Removing role check
1 parent 7afbed5 commit 6744dae

File tree

3 files changed

+0
-48
lines changed

3 files changed

+0
-48
lines changed

fly.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff 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"

pkg/flycheck/checks.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const Port = 5500
1515
func 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-
8461
func handleCheckResponse(w http.ResponseWriter, suite *su.CheckSuite, raw bool) {
8562
if suite.ErrOnSetup != nil {
8663
handleError(w, suite.ErrOnSetup)

pkg/flycheck/role.go

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)