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

Use extracted generic pubsub #48

Merged
merged 3 commits into from
Apr 24, 2020
Merged

Use extracted generic pubsub #48

merged 3 commits into from
Apr 24, 2020

Conversation

hannahhoward
Copy link
Collaborator

Goals

Use an extracted pubsub library that operates generically, so that fil-markets, graphsync, and others can avoid copying this pattern over and over

Implementation

  • Take the pubsub code and make it mostly generic, but as type safe as possible
  • Put it in its own library github.com/hannahhoward/go-pubsub

For discussion

Couple things going on here related to design that may not be obvious:

  • library was extracted to my personal github cause I intend to use it not just in filecoin but also IPFS
    • it could live in IPFS but it's a simple enough and generic enough library I'm not sure it should be there either -- there is nothing IPFS-ish or Filecoin-ish about it.
    • I did do proper license attribution and put the protocol copyright in there
  • there reason for the error return is not just for type checking but cause in graphsync we may want to short circuit transmitting to remaining callbacks in certain cases

@hannahhoward hannahhoward merged commit 813e13a into master Apr 24, 2020
@rvagg rvagg deleted the feat/generic-pubsub branch January 5, 2023 01:08
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.

1 participant