Skip to content
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

Add host info to machine #942

Closed
wants to merge 4 commits into from

Conversation

joshuataylor
Copy link
Contributor

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

Hi,

I would like to have the hostInfo exposed, which allows gGRPC to show full host info.

See here: https://pkg.go.dev/tailscale.com/[email protected]#Hostinfo

I'm unsure how to add tests around this.

I've tested this with my service which calls the gRPC endpoint, and it works 🎉.

image

@joshuataylor joshuataylor changed the title Add host info to Add host info to machine Nov 8, 2022
@kradalby
Copy link
Collaborator

Hi, while we do appreciate contribution, this one concerns me quite a bit as it hand types an upstream resource which will likely drift really fast and we would have the burden of making sure they stay in sync, which isnt really realistic.

This data could be exposed over gRPC, but then it should be a generic interface or JSON or something that allow you to unmarshal it to the upstream type on the other side.

@joshuataylor
Copy link
Contributor Author

Makes sense, and I agree.

My knowledge of Go is pretty limited, is there an easier way to do this (like a struct/interface/etc)? That way we could mimic how tailscale works, but if they change the way hostinfo works tailscale won't complain when the dep is bumped.

@kradalby
Copy link
Collaborator

Closing this for now, it will require a large rebase after our code reorg work goes in. If picked up again, please open when ready.

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.

2 participants