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

Provide function for finding address of interface used in outgoing connections #61

Open
embs opened this issue Sep 22, 2017 · 0 comments

Comments

@embs
Copy link

embs commented Sep 22, 2017

I'm working on instrumenting go services so they may make Zipkin aware of their location and found (through this SO answer) this way for fetching service IP.

I saw there's already a function for getting address given an interface:

func GetFirstAddressOf(name string) (string, error) {

I guess services will almost (?) always make use of eth0 interface but it seems to me that getting the address without fixing it for a given interface is a more robust way of finding service IP.

If so, shall we provide this, for instance, GetOutboundIP function in weaveworks/commons?

yeya24 pushed a commit to yeya24/common that referenced this issue Jun 12, 2024
route: Allow per-request custom context injection
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

No branches or pull requests

1 participant