Skip to content

compute: add /compute/stream to the internal api

Administrator requested to merge insights/compute-internal-api into main

Created by: coury-clark

Adds the /compute/stream endpoint to the internal router. This is for clients such as Code Insights that make use of the internal actor capability of the internal endpoints.

Test plan

Example response against http://localhost:3090/.internal/compute/stream?q=patterntype%3Aregexp+file%3A%5Ego%5C.mod+go%5Cs%2B%28%5Cd%2B%5C.%3F%5Cd%2A%29+count%3Aall+repo%3A%5Egithub%5C.com%2Fsourcegraph%2Fsourcegraph%24%407635d970254882c163109372d46ad67f4fbf1875

event: results, data: [{"matches":[{"value":"go 1.17","range":{"start":{"offset":-1,"line":2,"column":0},"end":{"offset":-1,"line":2,"column":7}},"environment":{"1":{"value":"1.17","range":{"start":{"offset":-1,"line":2,"column":3},"end":{"offset":-1,"line":2,"column":7}}}}}],"path":"go.mod","repositoryID":11,"repository":"github.com/sourcegraph/sourcegraph"}] 

Merge request reports

Loading