Set register ttl and interval by default

This commit is contained in:
Asim Aslam
2019-09-23 17:59:34 +01:00
parent d8dc713e2d
commit fa0d020556
3 changed files with 17 additions and 11 deletions

View File

@@ -116,13 +116,15 @@ type Subscriber interface {
type Option func(*Options)
var (
DefaultAddress = ":0"
DefaultName = "go.micro.server"
DefaultVersion = time.Now().Format("2006.01.02.15.04")
DefaultId = uuid.New().String()
DefaultServer Server = newRpcServer()
DefaultRouter = newRpcRouter()
DefaultRegisterCheck = func(context.Context) error { return nil }
DefaultAddress = ":0"
DefaultName = "go.micro.server"
DefaultVersion = time.Now().Format("2006.01.02.15.04")
DefaultId = uuid.New().String()
DefaultServer Server = newRpcServer()
DefaultRouter = newRpcRouter()
DefaultRegisterCheck = func(context.Context) error { return nil }
DefaultRegisterInterval = time.Second * 30
DefaultRegisterTTL = time.Minute
)
// DefaultOptions returns config options for the default service