contextWithORCAResult sets a key in ctx with a pointer to an ORCA load report that is to be filled in by the "test_backend_metrics_load_balancer" LB policy's Picker's Done callback. If a per-call load report is provided from the server for the call, result will be filled with that, otherwise the mo
(ctx context.Context, result **v3orcapb.OrcaLoadReport)
| 241 | // will be filled with that, otherwise the most recent OOB load report is used. |
| 242 | // If no OOB report has been received, result is not modified. |
| 243 | func contextWithORCAResult(ctx context.Context, result **v3orcapb.OrcaLoadReport) context.Context { |
| 244 | return context.WithValue(ctx, orcaCtxKey, result) |
| 245 | } |
| 246 | |
| 247 | // orcaResultFromContext returns the ORCA load report stored in the context. |
| 248 | // The LB policy uses this to communicate the load report back to the interop |