Add location service (#29)

* Add location service

* Update README.md
This commit is contained in:
Asim Aslam
2020-11-17 22:22:33 +00:00
committed by GitHub
parent 8f8e9a3a06
commit 25ae1f2b98
15 changed files with 869 additions and 0 deletions

24
location/main.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"log"
"github.com/micro/micro/v3/service"
"github.com/micro/services/location/handler"
pb "github.com/micro/services/location/proto"
"github.com/micro/services/location/subscriber"
)
func main() {
location := service.New(
service.Name("location"),
)
pb.RegisterLocationHandler(location.Server(), new(handler.Location))
service.Subscribe(subscriber.Topic, new(subscriber.Location))
if err := location.Run(); err != nil {
log.Fatal(err)
}
}