Skip to content

Add server info #128

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

Closed
wants to merge 2 commits into from
Closed

Conversation

tedkulp
Copy link

@tedkulp tedkulp commented Oct 19, 2015

Uses the info and version commands to get various info about the docker server.

My use-case for this is forwarding a lot of information to logstash from various clusters and wanting to be able to track down the server that the log entry is coming from quickly. Since fleet can deploy containers to different servers based on rules and availability, getting the hostname that the container lives on is vital.

I've also updated the structs in the README to match what's currently in the code.

Let me know if you have any questions/changes/etc.

Thanks!
Ted

Uses the info and version commands to get various info about the docker
server.

My use-case for this is forwarding a lot of information to logstash
from various clusters and wanting to be able to track down the server
that the log entry is coming from quickly. Since fleet can deploy
containers to different servers based on rules and availability, getting
the hostname that the container lives on is vital.
@md5
Copy link
Contributor

md5 commented Oct 19, 2015

This LGTM. This diff is easier to review: https://github.com/jwilder/docker-gen/pull/128/files?w=1

One question I have is why the check for apiVersion != nil is inside the apiInfo != nil check. Seems like they could be independent.

@tedkulp
Copy link
Author

tedkulp commented Oct 19, 2015

Only because it's nested inside. I could split them out into two different structs next to each other if you think it makes more sense. I was trying to not make the root struct too messy.

@md5
Copy link
Contributor

md5 commented Oct 19, 2015 via email

Volumes map[string]Volume
Node SwarmNode
Labels map[string]string
Server ServerInfo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe name this Docker instead? Server is kind of nebulous.

jwilder added a commit that referenced this pull request Jan 2, 2016
Based off of #128
@jwilder
Copy link
Collaborator

jwilder commented Jan 2, 2016

Fixed via #146.

@jwilder jwilder closed this Jan 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants