From 55454752f825a5ec033ca072350a77a928afd6ac Mon Sep 17 00:00:00 2001 From: Drew Erny Date: Fri, 16 Sep 2016 14:47:35 -0700 Subject: [PATCH] Added comments to PortConfig for greater clarity I always forget which one is which. Now, I can't forget. This is probably in the docs somewhere but now it's handy at a glance. Signed-off-by: Drew Erny --- api/types/swarm/network.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/types/swarm/network.go b/api/types/swarm/network.go index 0af0ce1daa..76b0bea1b5 100644 --- a/api/types/swarm/network.go +++ b/api/types/swarm/network.go @@ -25,10 +25,12 @@ const ( // PortConfig represents the config of a port. type PortConfig struct { - Name string `json:",omitempty"` - Protocol PortConfigProtocol `json:",omitempty"` - TargetPort uint32 `json:",omitempty"` - PublishedPort uint32 `json:",omitempty"` + Name string `json:",omitempty"` + Protocol PortConfigProtocol `json:",omitempty"` + // TargetPort is the port inside the container + TargetPort uint32 `json:",omitempty"` + // PublishedPort is the port on the swarm hosts + PublishedPort uint32 `json:",omitempty"` } // PortConfigProtocol represents the protocol of a port.