in-memory service registry (#1892)

This commit is contained in:
wasaga 2021-02-17 14:28:54 -05:00 committed by GitHub
parent ee28f008b5
commit d04416a5fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 2081 additions and 1 deletions

View file

@ -0,0 +1,22 @@
package registry
import (
"errors"
"time"
)
const (
// callAfterTTLFactor will request to report back again after TTL/callAfterTTLFactor time
callAfterTTLFactor = 2
// purgeAfterTTLFactor will purge keys with TTL * purgeAfterTTLFactor time
purgeAfterTTLFactor = 1
// min reporting ttl
minTTL = time.Second
// path metrics are available at
defaultMetricsPath = "/metrics"
)
var (
errNoMetricsAddr = errors.New("no metrics address provided")
errNoMetricsPort = errors.New("no metrics port provided")
)