pushStreamServer is a mock implementation of Ingester_PushStreamServer for testing PushStream. Context() injects stream-level authentication (X-Scope-OrgID), and Recv() provides the sequence of StreamWriteRequests sent by the client.
| 23 | // Context() injects stream-level authentication (X-Scope-OrgID), |
| 24 | // and Recv() provides the sequence of StreamWriteRequests sent by the client. |
| 25 | type pushStreamServer struct { |
| 26 | grpc.ServerStream |
| 27 | ctx context.Context |
| 28 | requests []*cortexpb.StreamWriteRequest |
| 29 | idx int |
| 30 | sent []*cortexpb.WriteResponse |
| 31 | } |
| 32 | |
| 33 | func (s *pushStreamServer) Context() context.Context { return s.ctx } |
| 34 |
nothing calls this directly
no outgoing calls
no test coverage detected