feat: make corehttp a reusable component#9070
feat: make corehttp a reusable component#9070lidel merged 5 commits intoipfs:masterfrom iand:feat-modular-gateway
Conversation
|
Looks great! Is a minimal change. Hopefully we can shrink that interface and get it even more minimal in the future. There are some failing sharness tests here related to the gateway and seem related to your changes. The failing tests are in test/sharness/t0117-gateway-block.sh. |
|
@aschmahmann fixed header issue, PTAL |
|
Updated to incorporate changes from #9082 |
|
@iand : we are hoping to land this for the 0.15 RC that we're cutting on Wednesday, 2022-08-17. Are you able to finish responding to comments so we can land this? |
Done. |
There was a problem hiding this comment.
Thank you, @iand.
This is a good step towards #8524 (comment), and the changed surface is small enough to be safe to be included in 0.15-rc1
feat: make corehttp a reusable component This commit was moved from ipfs/kubo@924ab06
This makes the minimal changes needed to allow the corehttp package to be imported and reused by external applications.
Fixes #8524
It adds a new interface that defines the minimal set of methods needed to run corehttp as a gateway and is a non-breaking change.
As an example of use, where
s.Gatewayimplements the four methods from the new interface(From https://github.com/iand/meridian/blob/006cf437183d07005e7b6254cb5a551eb64b102a/server.go#L77:L93)