Skip to content

added ipv6 support #122

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

Merged
merged 2 commits into from
Oct 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GLOCKFILE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/BurntSushi/toml f87ce853111478914f0bcffa34d43a93643e6eda
github.com/Sirupsen/logrus 6ebb4e7b3c24b9fef150d7693e728cb1ebadf1f5
github.com/docker/docker 95dcb2748442fc1f59e8c2e010679e0aea3cef1c
github.com/fsouza/go-dockerclient 1e60afa8d58b91a0eca0a732927c8ecba696493f
github.com/docker/docker 2606a2e4d3bf810ec82e373a6cd334e22e504e83
github.com/fsouza/go-dockerclient 1399676f53e6ccf46e0bf00751b21bed329bc60e
36 changes: 20 additions & 16 deletions docker-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ type Event struct {
}

type Address struct {
IP string
Port string
HostPort string
Proto string
HostIP string
IP string
IP6LinkLocal string
IP6Global string
Port string
HostPort string
Proto string
HostIP string
}

type Volume struct {
Expand All @@ -60,17 +62,19 @@ type Volume struct {
}

type RuntimeContainer struct {
ID string
Addresses []Address
Gateway string
Name string
Hostname string
Image DockerImage
Env map[string]string
Volumes map[string]Volume
Node SwarmNode
Labels map[string]string
IP string
ID string
Addresses []Address
Gateway string
Name string
Hostname string
Image DockerImage
Env map[string]string
Volumes map[string]Volume
Node SwarmNode
Labels map[string]string
IP string
IP6LinkLocal string
IP6Global string
}

type DockerImage struct {
Expand Down
4 changes: 4 additions & 0 deletions docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,14 @@ func getContainers(client *docker.Client) ([]*RuntimeContainer, error) {
Node: SwarmNode{},
Labels: make(map[string]string),
IP: container.NetworkSettings.IPAddress,
IP6LinkLocal: container.NetworkSettings.LinkLocalIPv6Address,
IP6Global: container.NetworkSettings.GlobalIPv6Address,
}
for k, v := range container.NetworkSettings.Ports {
address := Address{
IP: container.NetworkSettings.IPAddress,
IP6LinkLocal: container.NetworkSettings.LinkLocalIPv6Address,
IP6Global: container.NetworkSettings.GlobalIPv6Address,
Port: k.Port(),
Proto: k.Proto(),
}
Expand Down