Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint for liveness and readiness checks.
architecture: Endpoint
func NewEndpoint ¶
func NewEndpoint(log *zap.Logger, db Pingable, tokenPrice *tokenprice.Service, tokenService *tokens.Service) *Endpoint
NewEndpoint creates a new endpoint instance for the health checker.
func (*Endpoint) Live ¶
func (endpoint *Endpoint) Live(w http.ResponseWriter, r *http.Request)
Live checks if the storjscan service is running.
func (*Endpoint) Ready ¶
func (endpoint *Endpoint) Ready(w http.ResponseWriter, r *http.Request)
Ready checks whether the database connection is available and whether the token price and blockchain services are reachable. Returns 503 if database is unreachable. Sends a metric if either token price or blockchain services are unreachable. 200 indicates that the storjscan service is ready for use.
Click to show internal directories.
Click to hide internal directories.