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

refactor: use functions for block broker creation #286

Merged
merged 1 commit into from
Oct 13, 2023

Commits on Oct 13, 2023

  1. refactor: use functions for block broker creation

    This approach is consistent with libp2p components, unixfs, ipns, etc.
    
    Since #281 and #284 were merged without review, this PR implements
    suggsestions that would have been in the review of those PRs.
    
    1. Creation of block brokers is done by exported function. If your broker
        takes arguments, pass them to the factory function.  The factory then
        returns a function that accepts helia components and returns the
        broker.
    2. Removes BitswapBrokerFactory as it is redunant
    
    The internal API may need some more work but the external API should be
    relatively stable.
    achingbrain committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    6e44c7d View commit details
    Browse the repository at this point in the history