Skip to content
New issue

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

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

Already on GitHub? # to your account

Update Docs + API - matchingFunc #8

Open
jbenet opened this issue Aug 6, 2016 · 0 comments
Open

Update Docs + API - matchingFunc #8

jbenet opened this issue Aug 6, 2016 · 0 comments

Comments

@jbenet
Copy link
Member

jbenet commented Aug 6, 2016

Update Docs + API after the matchingFunc discussion. We discussed:

  • multistream takes in a tuple: (multicodec-header, handlerFunc, matchingFunc)
  • handlerFunc is called with the header
  • matchingFunc decides whether a header matches.
  • default matchingFunc is equivalence (tests the given header matches the original one)
// something like this
type matchingFunc func(h multicodecHeader) bool
type handlerFunc func(h multicodecHeader, s io.Stream)
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants