Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin client won't bootstrap successfully if the first message sent from plugin is not the negotiation format. #233

Open
chenxi-neo opened this issue Jan 12, 2023 · 1 comment

Comments

@chenxi-neo
Copy link

I'm now using go-plugin to develop some Golang applications and it works well. Except that if the first message the client received from the plugin is not the right format like: 1|1|tcp|127.0.0.1:1234|grpc, the client will not correctly negotiate with the plugin process . This is a bit strict if some plugin written in Golang import other third party libs that print something in the init function.
image
may be we could add some regex filter to extract the negotiate message from the plugin output? Or do we have better solution to deal with this problem?

@skyf0cker
Copy link

skyf0cker commented Jun 20, 2023

This also made me confused. We cannot guarantee that the third party module is designed to have no stdout in their init functions. Maybe we should find another way to negotiate a port to use for rpc.
CC @evan2645

func (c *Client) Start() (addr net.Addr, err error) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants