connect-go icon indicating copy to clipboard operation
connect-go copied to clipboard

Exporting `memhttp` / `memhttptest`

Open oxisto opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

We are currently exploring migrating our project from the gRPC Go implementation to connect-go. Since our project uses several micro services, we have a lot of tests were we launch other microservices (in a defined state) to interact with our test target (or the other way around). For that we heavily rely on the bufconn package to avoid a lot of unnecessary (even though local) network traffic and network port management in the tests.

It seems that the internal packages memhttp / memhttptest offer a similar functionality. I wonder if there is an intent to publish these packages as an official testing solution?

Describe the solution you'd like

Export the memhttp package.

oxisto avatar Feb 20 '24 11:02 oxisto

@oxisto, the internal package here was largely based on https://github.com/akshayjshah/memhttp. We are in fact considering something like this as exported API available in the connectrpc GitHub organization, but until then you can use the above 3rd-party module.

jhump avatar Feb 20 '24 13:02 jhump

@oxisto, the internal package here was largely based on https://github.com/akshayjshah/memhttp. We are in fact considering something like this as exported API available in the connectrpc GitHub organization, but until then you can use the above 3rd-party module.

Ah excellent, thanks! Having this within the connectrpc org would be awesome, but this will do for the migration period.

oxisto avatar Feb 20 '24 14:02 oxisto