- libnetwork cares for list of exposed ports, driver cares
for list of port bindings. At endpoint creation:
- list of exposed ports will be passed as libnetwork otion
- list of port mapping will be passed as driver option
Signed-off-by: Alessandro Boch <aboch@docker.com>
* Modified NB API with self referential var-aarg for future proofing the APIs
* Modified Driver API's option parameter to be a Map of interface{}
Signed-off-by: Madhu Venugopal <madhu@docker.com>
ISSUE:
- JoinOption type takes the exported interface Endpoint as parameter.
This does not allows libnetwork to control the setter functions
which will be executed by processOptions(). Client can now craft
any func (e Endpoint), pass it to Endpoint.Join() and have it executed.
Beside the fact this allows the client to shot himself in the foot,
there seem not to be a real need in having the JoinOption take the
Endpoint interface as parameter.
CHANGE:
- Changing the JoinOption signature to take a pointer to the unexported
endpoint structure. So now libnetwork is the only one that can define
the Join() method's options setter functions via the self referenced
JoinOption[...] functions.
Signed-off-by: Alessandro Boch <aboch@docker.com>