mirror of https://github.com/hashicorp/consul
catalog_events: set the right key for connect snapshots
parent
906834ce8e
commit
566741a143
|
@ -71,11 +71,18 @@ func serviceHealthSnapshot(db ReadDB, topic stream.Topic) stream.SnapshotFunc {
|
|||
event := stream.Event{
|
||||
Index: idx,
|
||||
Topic: topic,
|
||||
Payload: EventPayloadCheckServiceNode{
|
||||
Op: pbsubscribe.CatalogOp_Register,
|
||||
Value: &n,
|
||||
},
|
||||
}
|
||||
payload := EventPayloadCheckServiceNode{
|
||||
Op: pbsubscribe.CatalogOp_Register,
|
||||
Value: &n,
|
||||
}
|
||||
|
||||
// TODO: share this logic with serviceHealthToConnectEvents
|
||||
if connect && n.Service.Kind == structs.ServiceKindConnectProxy {
|
||||
payload.key = n.Service.Proxy.DestinationServiceName
|
||||
}
|
||||
|
||||
event.Payload = payload
|
||||
|
||||
if !connect {
|
||||
// append each event as a separate item so that they can be serialized
|
||||
|
|
Loading…
Reference in New Issue