filecoin-project / go-legs

Does the legwork for go-data-transfer
Apache License 2.0
20 stars 14 forks source link

Interface hasn't been unified between HTTP and graphsync #118

Open willscott opened 2 years ago

willscott commented 2 years ago

The final Syncer interface is defined, but the interface for creating a Sync vs Syncer, and then getting a Syncer from the Sync object has diverged a lot between the two paths. It should be as easy as having the needed host or http client available, and getting the right syncer based on the type of addr-info passed in.

gammazero commented 2 years ago

I think this is closer now, but not sure if sufficient to close this: https://github.com/filecoin-project/go-legs/blob/main/subscriber.go#L676 https://github.com/filecoin-project/go-legs/blob/main/subscriber.go#L693