-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Milestone
Description
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:
- Given a binary, such as
packer-build, the plugin lib must execute the underlying executable usingos/execor whatever. It must then initiate and abstract the RPC stuff. - To most of Packer, plugins must appear just as normal implementers of interfaces such as
CommandorBuilder. Keep it simple! - Multiple packer instances must be able to run at one time, so static ports for listening on RPC is not possible.
Other notes:
- I had an idea to use stdin/stdout for the communication mechanism for
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.