Skip to content

Commit

Permalink
maintenance: expose the Status method
Browse files Browse the repository at this point in the history
  • Loading branch information
janos committed Feb 25, 2019
1 parent 5dbe3a0 commit 79eb40c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions maintenance/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ func (s Service) TextHandler(h http.Handler) http.Handler {
})
}

// Status returns whether the maintenance mode is enabled.
func (s Service) Status() (on bool, err error) {
return s.store.Status()
}

// StatusHandler can be used in JSON-encoded HTTP API
// to check the status of maintenance.
func (s Service) StatusHandler(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 79eb40c

Please sign in to comment.