Skip to content

Commit

Permalink
Added service fault handler
Browse files Browse the repository at this point in the history
  • Loading branch information
racerxdl committed Feb 11, 2019
1 parent 59b52c0 commit a38d980
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ func GenRemoteSignerServerMux(slog *SLog.Instance, sm etc.SMInterface, gpg etc.P
ap := MakeAgentProxy(gpg, tm)
agentAdmin := MakeAgentAdmin(tm, am)

if ge == nil || ie == nil || te == nil || kre == nil || sks == nil || tm == nil || am == nil || ap == nil || agentAdmin == nil {
slog.Error("One or more services has not been initialized.")
slog.Error(" GPG Endpoint: %p", ge)
slog.Error(" Internal Endpoint: %p", ie)
slog.Error(" Tests Endpoint: %p", te)
slog.Error(" KeyRing Endpoint: %p", kre)
slog.Error(" SKS Endpoint: %p", sks)
slog.Error(" Token Manager: %p", tm)
slog.Error(" Auth Manager: %p", am)
slog.Error(" Agent Proxy: %p", ap)
slog.Error(" Agent Admin: %p", agentAdmin)
slog.Fatal("Please check if the settings are correct.")
}

r := mux.NewRouter()
// Add for /
AddHKPEndpoints(r.PathPrefix("/pks").Subrouter())
Expand Down

0 comments on commit a38d980

Please sign in to comment.