route

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a remote client that implements route.Interface

func NewClient

func NewClient(tracer opentracing.Tracer, logger log.Factory) *Client

NewClient creates a new route.Client

func (*Client) FindRoute

func (c *Client) FindRoute(ctx context.Context, pickup, dropoff string) (*Route, error)

FindRoute implements route.Interface#FindRoute as an RPC

type Interface

type Interface interface {
	FindRoute(ctx context.Context, pickup, dropoff string) (*Route, error)
}

Interface exposed by the Driver service.

type Route

type Route struct {
	Pickup  string
	Dropoff string
	ETA     time.Duration
}

Route describes a route between Pickup and Dropoff locations and expected time to arrival.

type Server

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

Server implements Route service

func NewServer

func NewServer(hostPort string, tracer opentracing.Tracer, logger log.Factory) *Server

NewServer creates a new route.Server

func (*Server) Run

func (s *Server) Run() error

Run starts the Route server

Jump to

Keyboard shortcuts

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