Closed dstrop closed 3 years ago
Hey @dstrop . You can add your custom plugin to: https://github.com/spiral/roadrunner-binary/blob/master/internal/container/plugins.go. There is no difference where located plugin registration because you still need to fork/clone repository to add your custom plugin and then build the binary.
i didnt need to fork the repository i just imported
roadrunner-binary` as go mod dependency
as you can see in the code snippet
but i take it as forking is the recomended way forward. thank you
And the answers to your points:
serve
, workers
, reset
at the moment.i didn
t need to fork the repository i just imported
roadrunner-binary` as go mod dependency as you can see in the code snippetbut i take it as forking is the recomended way forward. thank you
Yes, the roadrunner-binary
repository should not be imported as the library. Please, do the clone or fork.
To create your custom solution, import (import "github.com/spiral/roadrunner/v2"
) the roadrunner
main repo, which is designed as the library and supposed to be cloned/forked. Then add your CLI and custom plugin(s).
Thanks for the FR @dstrop , I'm going to close this ticket and open a new one to update mentioned documentation page (https://roadrunner.dev/docs/beep-beep-build)
Is your feature request related to a problem? Please describe.
I would like to build the binary with custom plugins but since 2.0.4 the
cli
package was moved tointernal
and i can no longer add my pluginDescribe the solution you'd like
move
cli
package outside ofinternal
Describe alternatives you've considered
a) public interface in root package (
roadrunner_binary
) which would allow me to runcli.Container.Register
andcli.Execute
this would be nice and still allow you to controll what is exposed b) implement golang plugins https://golang.org/pkg/plugin/ this would be ideal solution as i would be concerned only with plugin interfaces, but might be hard to implement c) clone the roadrunner-binary project and maintain custom branchAdditional context
i am working off of https://roadrunner.dev/docs/beep-beep-build which suggests
Copy main.go file in the root of your project
for a code on 2.0.2 but since
cli
is ininternal
this no longer worksthis might be considered a bug or a regression since it was suggested by documentation