application-research / estuary

A custom IPFS/Filecoin node that makes it easy to pin IPFS content and make Filecoin deals.
https://docs.estuary.tech
Other
240 stars 66 forks source link

Unify shuttle, shuttle-proxy and main estuary APIs #263

Open gmelodie opened 2 years ago

gmelodie commented 2 years ago

We shouldn't need to maintain the same API on three separate packages. We should have a way to declare the estuary API and then, on another file, just specify which endpoints will be available on the Shuttle API and which will be on the shuttle-proxy API.

corinne-antonia commented 2 years ago

Hey @whyrusleeping, do you think this makes sense to do? And who do you think is the best person to delegate this to?

gmelodie commented 2 years ago

I was thinking maybe having a base API communicator which implements endpoints necessary to talk to other players (such as a shuttle or a main node), then we'll have files for methods specific to these communicators/players (like a shuttle_api.go).

P.S.: just writing this comment makes me feel like this is overengineering the thing. What I wanted originally is to solve the hassle of having to replicate code for shuttle, proxy and main node. That's what we need to fix