| 1 | package plugin |
| 2 | |
| 3 | import ( |
| 4 | "github.com/ipfs/kubo/core" |
| 5 | "go.uber.org/fx" |
| 6 | ) |
| 7 | |
| 8 | // PluginFx can be used to customize the fx options passed to the go-ipfs app when it is initialized. |
| 9 | // |
| 10 | // This is invasive and depends on internal details such as the structure of the dependency graph, |
| 11 | // so breaking changes might occur between releases. |
| 12 | // So it's recommended to keep this as simple as possible, and stick to overriding interfaces |
| 13 | // with fx.Replace() or fx.Decorate(). |
| 14 | // |
| 15 | // The returned options become the complete array of options passed to fx. |
| 16 | // Generally you'll want to append additional options to NodeInfo.FXOptions and return that. |
| 17 | type PluginFx interface { |
| 18 | Plugin |
| 19 | Options(core.FXNodeInfo) ([]fx.Option, error) |
| 20 | } |