Better IPFS as a library constructor
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
We can currently get an IpfsNode by calling
https://github.com/ipfs/go-ipfs/blob/2ae5c52f4f0f074864ea252e90e72e8d5999caba/core/builder.go#L27
Unfortunately the `BuildCfg` is covers just a fraction of the sorts of options a custom IpfsNode my want to utilize. I think it would be very useful to have some constructor that looks something like:
`NewNode(ctx context.Context, option... IpfsNodeOption) (*IpfsNode, error)` and we can start to slowly expand the number of IpfsNode options. This also allows us to more easily deal with subcomponent options (e.g. passing options like `WithExchange(BitswapExchange(bitswapOptions...))`).
This could allow us to hide away the internals of the fx dependency injection while still utilizing it internally.
Contributor guide
Assessment
This issue has not been assessed yet.