Skip to content

Commit

Permalink
Add protocol to port info
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilder committed Nov 5, 2014
1 parent 44b38cf commit 369c2cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docker-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ type Address struct {
IP string
Port string
HostPort string
Proto string
}

type RuntimeContainer struct {
ID string
Addresses []Address
Expand Down
5 changes: 3 additions & 2 deletions docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ func getContainers(client *docker.Client) ([]*RuntimeContainer, error) {
}
for k, v := range container.NetworkSettings.Ports {
address := Address{
IP: container.NetworkSettings.IPAddress,
Port: k.Port(),
IP: container.NetworkSettings.IPAddress,
Port: k.Port(),
Proto: k.Proto(),
}
if len(v) > 0 {
address.HostPort = v[0].HostPort
Expand Down

0 comments on commit 369c2cc

Please sign in to comment.