I try to run test examples:
package main import ( "fmt" micro "github.com/micro/go-micro" proto "github.com/micro/go-micro/examples/service/proto" "golang.org/x/net/context" ) type Greeter struct{} func (g *Greeter) Hello(ctx context.Context, req *proto.HelloRequest, rsp *proto.HelloResponse) error { rsp.Greeting = "Hello " + req.Name return nil } func main() { // Create a new service. Optionally include some options here. service := micro.NewService( micro.Name("greeter"), micro.Version("latest"), micro.Metadata(map[string]string{ "type": "helloworld", }), ) // Init will parse the command line flags. Any flags set will // override the above settings. Options defined here will // override anything set on the command line. service.Init() // Register handler proto.RegisterGreeterHandler(service.Server(), new(Greeter)) // Run the server if err := service.Run(); err != nil { fmt.Println(err) } } I get the following error:
Starting Process MicroServer.exe ... 2016/09/21 11:09:48 Listening on [::]: 64497 2016/09/21 11:09:48 Broker Listening on [::]: 64498 2016/09/21 11:09:48 Registering node: greeter-0026467f-7fc2-11e6-b412-6cf049da6b 9d Put http://127.0.0.1:8500/v1/agent/service/register : dial tcp 127.0.0.1:8500: co nnectex: It wasn’t any problem.
End Process exit status 0
Press enter key to continue
I try to run under win7, even at startup it requires to allow network access along the path: C: \ users \ nikita \ appdata \ local \ temp \ go-build139080506 \ command-line-arguments_obj \ exe;
But I do not have such a directory, I have not installed something ??
Thank you in advance!