Advertise health-aware peer cache ranking
This commit is contained in:
@@ -2980,6 +2980,7 @@ func heartbeatPayload(cfg config.Config, identity state.Identity, meshState *syn
|
||||
payload.Metadata["mesh_peer_recovery_report"] = meshPeerRecoveryReport(meshState, observedAt)
|
||||
payload.Metadata["mesh_peer_connection_intent_report"] = meshPeerConnectionIntentReport(meshState, observedAt)
|
||||
payload.Metadata["mesh_peer_connection_manager_report"] = meshPeerConnectionManagerReport(meshState, observedAt)
|
||||
payload.Capabilities["mesh_peer_cache_endpoint_health_ranking"] = true
|
||||
payload.Metadata["mesh_rendezvous_lease_report"] = meshRendezvousLeaseReport(meshState, identity, observedAt)
|
||||
payload.Metadata["mesh_route_path_decision_report"] = meshRoutePathDecisionReport(meshState, identity, observedAt)
|
||||
payload.Metadata["mesh_route_generation_report"] = meshRouteGenerationReport(meshState, identity, observedAt)
|
||||
|
||||
@@ -1302,6 +1302,9 @@ func TestHeartbeatPayloadIncludesPeerRecoveryReportWithoutAdvertisedEndpoint(t *
|
||||
if payload.Capabilities["mesh_peer_connection_intent_planning"] != true {
|
||||
t.Fatalf("connection intent capability missing: %+v", payload.Capabilities)
|
||||
}
|
||||
if payload.Capabilities["mesh_peer_cache_endpoint_health_ranking"] != true {
|
||||
t.Fatalf("peer cache endpoint health capability missing: %+v", payload.Capabilities)
|
||||
}
|
||||
if _, ok := payload.Metadata["mesh_endpoint_report"]; ok {
|
||||
t.Fatalf("endpoint report should not be emitted without advertised endpoint: %+v", payload.Metadata)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user