rpcclient: use streaming for connect health
This commit is contained in:
parent
8d09d610dd
commit
e2215d9f0f
|
@ -377,8 +377,6 @@ func New(bd BaseDeps) (*Agent, error) {
|
|||
Cache: bd.Cache,
|
||||
NetRPC: &a,
|
||||
CacheName: cacheName,
|
||||
// Temporarily until streaming supports all connect events
|
||||
CacheNameConnect: cachetype.HealthServicesName,
|
||||
}
|
||||
|
||||
a.serviceManager = NewServiceManager(&a)
|
||||
|
|
|
@ -202,9 +202,7 @@ func processDBChanges(tx ReadTxn, changes Changes) ([]stream.Event, error) {
|
|||
|
||||
func newSnapshotHandlers(db ReadDB) stream.SnapshotHandlers {
|
||||
return stream.SnapshotHandlers{
|
||||
topicServiceHealth: serviceHealthSnapshot(db, topicServiceHealth),
|
||||
// The connect topic is temporarily disabled until the correct events are
|
||||
// created for terminating gateway changes.
|
||||
//topicServiceHealthConnect: serviceHealthSnapshot(db, topicServiceHealthConnect),
|
||||
topicServiceHealth: serviceHealthSnapshot(db, topicServiceHealth),
|
||||
topicServiceHealthConnect: serviceHealthSnapshot(db, topicServiceHealthConnect),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,6 @@ type Client struct {
|
|||
Cache CacheGetter
|
||||
// CacheName to use for service health.
|
||||
CacheName string
|
||||
// CacheNameConnect is the name of the cache to use for connect service health.
|
||||
CacheNameConnect string
|
||||
}
|
||||
|
||||
type NetRPC interface {
|
||||
|
@ -54,12 +52,7 @@ func (c *Client) getServiceNodes(
|
|||
return out, cache.ResultMeta{}, err
|
||||
}
|
||||
|
||||
cacheName := c.CacheName
|
||||
if req.Connect {
|
||||
cacheName = c.CacheNameConnect
|
||||
}
|
||||
|
||||
raw, md, err := c.Cache.Get(ctx, cacheName, &req)
|
||||
raw, md, err := c.Cache.Get(ctx, c.CacheName, &req)
|
||||
if err != nil {
|
||||
return out, md, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue