add RegisterCheck server option for internal health checks

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2019-05-13 01:39:42 +03:00
parent 4f5ff076d4
commit a13cdfcc34
3 changed files with 43 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ import (
"syscall"
"github.com/google/uuid"
"github.com/micro/go-log"
log "github.com/micro/go-log"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/registry"
)
@@ -115,12 +115,13 @@ type Subscriber interface {
type Option func(*Options)
var (
DefaultAddress = ":0"
DefaultName = "server"
DefaultVersion = "latest"
DefaultId = uuid.New().String()
DefaultServer Server = newRpcServer()
DefaultRouter = newRpcRouter()
DefaultAddress = ":0"
DefaultName = "server"
DefaultVersion = "latest"
DefaultId = uuid.New().String()
DefaultServer Server = newRpcServer()
DefaultRouter = newRpcRouter()
DefaultRegisterCheck = func(context.Context) error { return nil }
)
// DefaultOptions returns config options for the default service