示例#1
0
func init() {
	host, err := transport.NewHostLocator("127.0.0.1")
	if err != nil {
		log.Fatal(err)
	}
	localhost = host
	oneHost = SimplePlacement(transport.Locators{host})
}
示例#2
0
func (h *HttpTransport) LocatorFor(value string) (transport.Locator, error) {
	return transport.NewHostLocator(value)
}