Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract dht, kbucket, routing, record, testutils, etc. [work-in-progress] #3185

Closed
wants to merge 4 commits into from
Closed

Extract dht, kbucket, routing, record, testutils, etc. [work-in-progress] #3185

wants to merge 4 commits into from

Conversation

geoah
Copy link
Contributor

@geoah geoah commented Sep 4, 2016

This is a direct continuation of the work done to separate the dht package. It replaces various packages with external ones.

  • github.com/libp2p/go-libp2p-kad-dht
  • github.com/libp2p/go-libp2p-routing
  • github.com/libp2p/go-libp2p-kbucket
  • github.com/libp2p/go-libp2p-record
  • github.com/libp2p/go-testutil
  • github.com/ipfs/go-key
  • github.com/ipfs/go-todocounter
  • github.com/ipfs/go-libp2p-loggables
  • ... probably a couple more

Once libp2p/go-libp2p-kad-dht#6 is merged, there a couple more stuff to do and this should be merge-able as well.

License: MIT
Signed-off-by: George Antoniadis <george@noodles.gr>
License: MIT
Signed-off-by: George Antoniadis <george@noodles.gr>
License: MIT
Signed-off-by: George Antoniadis <george@noodles.gr>
// TODO(geoah) Move to ./testutils or somewhere else
func ThreadSafeCloserMapDatastore() ThreadSafeDatastoreCloser {
return CloserWrap(syncds.MutexWrap(datastore.NewMapDatastore()))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the ThreadSafeCloserMapDatastore I'm talking about.
Originally this was under thirdparty/testutils/datastore.go but as there was no other reason for go-testutils to depend on go-datastore it was removed.

I have temporarily put it under thirdparty/datastore2 but I'm open to suggestions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats fine with me. The more we break things out the easier it will become to find homes for these sorts of things.

@whyrusleeping whyrusleeping added help wanted Seeking public contribution on this issue status/in-progress In progress and removed help wanted Seeking public contribution on this issue labels Sep 4, 2016
@whyrusleeping
Copy link
Member

Looks like we need to delete blocks/key, routing/{dht,kbucket,record} and maybe a few others too, and then we should actually use these new extracted packages 📦

License: MIT
Signed-off-by: George Antoniadis <george@noodles.gr>
@geoah
Copy link
Contributor Author

geoah commented Sep 4, 2016

@whyrusleeping not sure why the packages were still there.
The external ones were already being used instead of the local ones, I just didn't remove them for some reason.

I have now actually removed the packages. I think I got them all?

@geoah
Copy link
Contributor Author

geoah commented Sep 9, 2016

Closing this in favour or more, smaller PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants