Begin introduction of new linking interfaces.
This is going to be the start of a pretty hectic set of commits.
1. The LinkLoader, LinkBuilder, and LinkContext types currently in
the traversal package are hereby doomed (and will be deleted by
the time this branch is ready to land).
2. Cid itself will disappear from almost all remaining concrete uses.
For example, traversal.TraversalProgress.LastBlock will use Link
instead of Cid. (You'll have to cast back to Cid if that detail
is important to your application!)
3. The 'repose' package is pretty much getting nuked.
Instead: we have these new interfaces. Link will be abstract.
We'll add a linking package with a subpackage containing implementation
with Cids. Our encoding systems will then also live there: this makes
sense since multicodec is definitely a detail associated with Cids.
We'll also have dag-cbor and dag-json specific encodings in subpackages
associated with this whole thing: those will be able to read and reify
Link instances during their handling of serial data. This too is
parsimonious and correct (e.g. dag-json parsing is technically distinct
from regular json parsing, even if it's experientially close).
And if all goes according to plan, we will -- shockingly -- be able to
use almost the entirety of the IPLD system... *without* forming an
explicit import dependency on the Cid packages *until* we directly use
any link loading features based on Cids. That'll be neat.
All these changes will be staged across a series of commits because
the total diff will definitely be something fierce.
Signed-off-by: Eric Myhre <hash@exultant.us>
Showing
linking.go
0 → 100644
Please register or sign in to comment