-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 Architecture #1
Comments
So it looks like Instead, I think we should just open two connections (one from core to the plugin, and one from plugin to the core). If either of these is dead, the whole plugin connection is severed (panic?). Given that, we can't use stdin/stdout. We have to use TCP sockets. Another option would be to use named pipes. This would be super rad but is poorly supported on Windows. I think the safest thing to do would be to just use TCP sockets. |
So here is an idea for how to use TCP ports.
|
I've started implementing the RPC mechanism for
This is all tested and works so far! (See These are the "low-level" interfaces/structs for the remote command stuff. I imagine there will be a construtor-like method on top like |
DONE, on a high level. There is still a lot of work to do in the space of error handling... So the way this works is pretty neat. There are, as of this comment, three main packages:
This separation makes it SUPER nice because:
This makes a nice separation that makes working with this stuff quite nice. |
…#1) * Adding config to specify allowed inbound IP addresses * Also allowing CIDR blocks in addition to IP addresses
…#1) * Adding config to specify allowed inbound IP addresses * Also allowing CIDR blocks in addition to IP addresses
Synchronize fork from upstream repository
We need a plugin architecture in place. Because Golang doesn't support dynamic linking of any kind, we'll have to use IPC for this. To keep things as simple as possible, let's go with the
net/rpc
package to get this done.Ideas:
packer-build
, the plugin lib must execute the underlying executable usingos/exec
or whatever. It must then initiate and abstract the RPC stuff.Command
orBuilder
. Keep it simple!Other notes:
net/rpc
. If this gets done, can the plugin call back into Packer? There are cases where this is necessary, so it is important that is possible.The text was updated successfully, but these errors were encountered: