Skip to content

transport and discovery modules: use a function instead of a class #223

Closed
@pgte

Description

@pgte

Currently, you can define a transport or discovery module as an instance or a class.
Instead of a class, why not a function call here and here? This way, the provider has control over which instance to deliver to libp2p.

Use case: this allows me to solve peer-base/peer-base#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementA net-new feature or improvement to an existing featurestatus/readyReady to be worked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions