Skip to content

Commit

Permalink
docs: add fx plugin documentation to plugins.md
Browse files Browse the repository at this point in the history
  • Loading branch information
guseggert committed Aug 12, 2022
1 parent 310dca5 commit 3e8a5aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ application without IPC and without forking Kubo.
Note: We eventually plan to make Kubo usable as a library. However, this
plugin type is likely the best interim solution.

### fx

Fx plugins let you customize the [fx](https://pkg.go.dev/go.uber.org/fx) dependency graph and configuration,
by customizing the`fx.Option`s that are passed to `fx` when the IPFS node is initialized.

For example, you can inject custom implementations of interfaces such as [exchange.Interface](https://github.com/ipfs/go-ipfs-exchange-interface)
or [pin.Pinner](https://github.com/ipfs/go-ipfs-pinner) by adding an option like `fx.Replace(fx.Annotate(customExchange, fx.As(new(exchange.Interface))))`.

### Internal

(never stable)
Expand Down

0 comments on commit 3e8a5aa

Please sign in to comment.