Skip to content

Conversation

@m4gpi
Copy link

@m4gpi m4gpi commented Jun 26, 2020

Enables per-hypercore opts to be used over default set by multifeed instance. We need this in kappa-drive for an update to hyperdrive, see here:

https://gitlab.com/coboxcoop/kappa-drive/-/merge_requests/4/diffs#a77b15c0d64cf6111e025645e562faf8ccabb9d7_427_427

We're using multifeed's writer function to generate feeds, then creating a trie and hyperdrive out of those returned feeds. This custom opts allows us to create a trie with { valueEncoding: 'binary' }, which is different to the other's feeds encodings.

@hackergrrl
Copy link
Member

Thanks for the patch! Would you be open to using opts.hypercoreOpts or opts.hypercore for the opts to be passed down to the hypercore? Since writing this module I've become a bigger fan of namespacing pass-down opts with a key, to avoid passing down things by mistake.

Could you also add a note in the README about this new opts?

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.

2 participants