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 helper method to get snet.Addr from any service of a SVCType #2629

Closed
lukedirtwalker opened this issue May 2, 2019 · 1 comment
Closed

Comments

@lukedirtwalker
Copy link
Collaborator

currently we have this code repeated in many places:

	svcInfo, err := topo.GetSvcInfo(proto.ServiceType_ps)
	if err != nil {
		log.Error("..Failed to get svcInfo for PS", "err", err)
		return
	}
	topoAddr := svcInfo.GetAnyTopoAddr()
	if topoAddr == nil {
		log.Error("...No PS found in topology")
		return
	}
	a := &snet.Addr{
		IA:      topo.ISD_AS,
		Host:    topoAddr.PublicAddr(topo.Overlay),
		NextHop: topoAddr.OverlayAddr(topo.Overlay),
	}

we should have a helper method for this.

@oncilla
Copy link
Contributor

oncilla commented May 16, 2019

fixed in #2666

@oncilla oncilla closed this as completed May 16, 2019
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

2 participants