location-srv

command module
v0.0.0-...-6e9de5f Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

Location Service

The Location Service 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

We need service discovery

Zero Dependency

Use multicast DNS locally by passing --registry=mdns to the client and server

go run main.go --registry=mdns
Consul
brew install consul
consul agent -dev

Usage

Run Service
go run main.go 

Or

docker run microhq/location-srv
Test Service
go run location-srv/examples/client_request.go

Output

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