1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

add RegisterCheck web server option for internal health checks

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Vasiliy Tolstov
2019-12-05 17:15:35 +03:00
parent 18cf025056
commit a957e90ca8
3 changed files with 24 additions and 1 deletions

View File

@ -2,6 +2,7 @@
package web
import (
"context"
"net/http"
"time"
@ -32,7 +33,8 @@ var (
DefaultRegisterInterval = time.Second * 30
// static directory
DefaultStaticDir = "html"
DefaultStaticDir = "html"
DefaultRegisterCheck = func(context.Context) error { return nil }
)
// NewService returns a new web.Service