multistream-select
multistream-select copied to clipboard
Update Docs + API - matchingFunc
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)