geo-srv

command module
v0.0.0-...-1d1e641 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

README

Geo Server

The Geo Server provides an api for saving and retrieving the gps location of any entity.

It's uses go-micro for the microservice core and Hailo's go-geoindex for fast point tracking and K-Nearest queries.

Prerequisites

Install Consul https://www.consul.io/intro/getting-started/install.html

Run Consul

$ consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul

Run Service

$ go run main.go 
I0307 19:39:30.293051   91480 rpc_server.go:156] Rpc handler /_rpc
I0307 19:39:30.293170   91480 server.go:90] Starting server go.micro.srv.geo id go.micro.srv.geo-ac37ab32-c501-11e4-bc62-68a86d0d36b6
I0307 19:39:30.293269   91480 rpc_server.go:187] Listening on [::]:50161
I0307 19:39:30.293301   91480 server.go:76] Registering go.micro.srv.geo-ac37ab32-c501-11e4-bc62-68a86d0d36b6

Test Service

$ go run geo-srv/examples/client_request.go
Saved entity: id:"id123" type:"runner" location:<latitude:51.516509 longitude:0.124615 timestamp:1425757925 > 
Read entity: id:"id123" type:"runner" location:<latitude:51.516509 longitude:0.124615 timestamp:1425757925 > 
Search results: [id:"id123" type:"runner" location:<latitude:51.516509 longitude:0.124615 timestamp:1425757925 > ]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
web
Package common is a generated protocol buffer package.
Package common is a generated protocol buffer package.
location
Package location is a generated protocol buffer package.
Package location is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL