mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-20 00:39:48 +02:00
feat: readiness check (#1839)
* feat: readiness check * fix: no need for query param * docs: add a note * chore: move the readyness check to its own endpoint * docs(cr): add godoc Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
co-authored by
Joel Speed
parent
8b77c97009
commit
f753ec1ca5
@@ -15,4 +15,5 @@ type Store interface {
|
||||
Load(context.Context, string) ([]byte, error)
|
||||
Clear(context.Context, string) error
|
||||
Lock(key string) sessions.Lock
|
||||
VerifyConnection(context.Context) error
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package persistence
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
@@ -90,3 +91,8 @@ func (m *Manager) Clear(rw http.ResponseWriter, req *http.Request) error {
|
||||
return m.Store.Clear(req.Context(), key)
|
||||
})
|
||||
}
|
||||
|
||||
// VerifyConnection validates the underlying store is ready and connected
|
||||
func (m *Manager) VerifyConnection(ctx context.Context) error {
|
||||
return m.Store.VerifyConnection(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user