Registration Retry / Interval (#1651)

* Change the default ttl to 90 seconds

* add retries to registration

* Add retry to web register
This commit is contained in:
Asim Aslam
2020-05-20 11:49:09 +01:00
committed by GitHub
parent e61edf6280
commit a29676b86a
5 changed files with 76 additions and 19 deletions

View File

@@ -125,7 +125,7 @@ type Handler interface {
}
// Subscriber interface represents a subscription to a given topic using
// a specific subscriber function or object with endpoints. It mirrors
// a specific subscriber function or object with endpoints. It mirrors
// the handler in its behaviour.
type Subscriber interface {
Topic() string
@@ -145,7 +145,7 @@ var (
DefaultRouter = newRpcRouter()
DefaultRegisterCheck = func(context.Context) error { return nil }
DefaultRegisterInterval = time.Second * 30
DefaultRegisterTTL = time.Minute
DefaultRegisterTTL = time.Second * 90
// NewServer creates a new server
NewServer func(...Option) Server = newRpcServer