server

package
v0.0.0-...-12b612f Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	StopOnFirstFound bool
	CacheCount       int
	Strategy         string
	DBURL            string
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server exposes indexes services.

func New

func New(ctx context.Context, storage insideout.Store, logger log.Logger, healthServer *health.Server,
	opts Options) (*Server, error)

New returns a Server.

func (*Server) DebugGetHandler

func (s *Server) DebugGetHandler(w http.ResponseWriter, r *http.Request)

DebugGetHandler HTTP 1.1 Handler to debug a feature.

func (*Server) Get

func (s *Server) Get(ctx context.Context, req *insidesvc.GetRequest) (resp *insidesvc.GetResponse, terr error)

func (*Server) IndexStab

func (s *Server) IndexStab(lat, lng float64) ([]*insideout.Feature, error)

Stab returns features containing lat lng.

func (*Server) Within

func (s *Server) Within(
	ctx context.Context, req *insidesvc.WithinRequest,
) (resp *insidesvc.WithinResponse, terr error)

Within query exposed via gRPC.

func (*Server) WithinHandler

func (s *Server) WithinHandler(w http.ResponseWriter, r *http.Request)

WithinHandler HTTP 1.1 Handler to query within returns GeoJSON.

Directories

Path Synopsis
package debug expose tools to debug insideout indexed geo data
package debug expose tools to debug insideout indexed geo data

Jump to

Keyboard shortcuts

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