Documentation ¶
Index ¶
- Variables
- func RegisterTrackingServer(s grpc.ServiceRegistrar, srv TrackingServer)
- type Feature
- type Point
- type Rectangle
- type RouteNote
- type RouteSummary
- func (*RouteSummary) Descriptor() ([]byte, []int)deprecated
- func (x *RouteSummary) GetDistance() int32
- func (x *RouteSummary) GetElapsedTime() int32
- func (x *RouteSummary) GetFeatureCount() int32
- func (x *RouteSummary) GetPointCount() int32
- func (*RouteSummary) ProtoMessage()
- func (x *RouteSummary) ProtoReflect() protoreflect.Message
- func (x *RouteSummary) Reset()
- func (x *RouteSummary) String() string
- type TrackingClient
- type TrackingServer
- type Tracking_ListFeaturesClient
- type Tracking_ListFeaturesServer
- type Tracking_RecordRouteClient
- type Tracking_RecordRouteServer
- type Tracking_RouteChatClient
- type Tracking_RouteChatServer
- type UnimplementedTrackingServer
- func (UnimplementedTrackingServer) GetFeature(context.Context, *Point) (*Feature, error)
- func (UnimplementedTrackingServer) ListFeatures(*Rectangle, Tracking_ListFeaturesServer) error
- func (UnimplementedTrackingServer) RecordRoute(Tracking_RecordRouteServer) error
- func (UnimplementedTrackingServer) RouteChat(Tracking_RouteChatServer) error
- type UnsafeTrackingServer
Constants ¶
This section is empty.
Variables ¶
var File_tracking_tracking_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTrackingServer ¶
func RegisterTrackingServer(s grpc.ServiceRegistrar, srv TrackingServer)
Types ¶
type Feature ¶
type Feature struct { // The name of the feature. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The point where the feature is detected. Location *Point `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` // contains filtered or unexported fields }
A feature names something at a given point.
If a feature could not be named, the name is empty.
func (*Feature) Descriptor
deprecated
func (*Feature) GetLocation ¶
func (*Feature) ProtoMessage ¶
func (*Feature) ProtoMessage()
func (*Feature) ProtoReflect ¶
func (x *Feature) ProtoReflect() protoreflect.Message
type Point ¶
type Point struct { Latitude int32 `protobuf:"varint,1,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude int32 `protobuf:"varint,2,opt,name=longitude,proto3" json:"longitude,omitempty"` // contains filtered or unexported fields }
Points are represented as latitude-longitude pairs in the E7 representation (degrees multiplied by 10**7 and rounded to the nearest integer). Latitudes should be in the range +/- 90 degrees and longitude should be in the range +/- 180 degrees (inclusive).
func (*Point) Descriptor
deprecated
func (*Point) GetLatitude ¶
func (*Point) GetLongitude ¶
func (*Point) ProtoMessage ¶
func (*Point) ProtoMessage()
func (*Point) ProtoReflect ¶
func (x *Point) ProtoReflect() protoreflect.Message
type Rectangle ¶
type Rectangle struct { // One corner of the rectangle. Lo *Point `protobuf:"bytes,1,opt,name=lo,proto3" json:"lo,omitempty"` // The other corner of the rectangle. Hi *Point `protobuf:"bytes,2,opt,name=hi,proto3" json:"hi,omitempty"` // contains filtered or unexported fields }
A latitude-longitude rectangle, represented as two diagonally opposite points "lo" and "hi".
func (*Rectangle) Descriptor
deprecated
func (*Rectangle) ProtoMessage ¶
func (*Rectangle) ProtoMessage()
func (*Rectangle) ProtoReflect ¶
func (x *Rectangle) ProtoReflect() protoreflect.Message
type RouteNote ¶
type RouteNote struct { // The location from which the message is sent. Location *Point `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` // The message to be sent. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
A RouteNote is a message sent while at a given point.
func (*RouteNote) Descriptor
deprecated
func (*RouteNote) GetLocation ¶
func (*RouteNote) GetMessage ¶
func (*RouteNote) ProtoMessage ¶
func (*RouteNote) ProtoMessage()
func (*RouteNote) ProtoReflect ¶
func (x *RouteNote) ProtoReflect() protoreflect.Message
type RouteSummary ¶
type RouteSummary struct { // The number of points received. PointCount int32 `protobuf:"varint,1,opt,name=pointCount,proto3" json:"pointCount,omitempty"` // The number of known features passed while traversing the route. FeatureCount int32 `protobuf:"varint,2,opt,name=featureCount,proto3" json:"featureCount,omitempty"` // The distance covered in metres. Distance int32 `protobuf:"varint,3,opt,name=distance,proto3" json:"distance,omitempty"` // The duration of the traversal in seconds. ElapsedTime int32 `protobuf:"varint,4,opt,name=elapsedTime,proto3" json:"elapsedTime,omitempty"` // contains filtered or unexported fields }
A RouteSummary is received in response to a RecordRoute rpc.
It contains the number of individual points received, the number of detected features, and the total distance covered as the cumulative sum of the distance between each point.
func (*RouteSummary) Descriptor
deprecated
func (*RouteSummary) Descriptor() ([]byte, []int)
Deprecated: Use RouteSummary.ProtoReflect.Descriptor instead.
func (*RouteSummary) GetDistance ¶
func (x *RouteSummary) GetDistance() int32
func (*RouteSummary) GetElapsedTime ¶
func (x *RouteSummary) GetElapsedTime() int32
func (*RouteSummary) GetFeatureCount ¶
func (x *RouteSummary) GetFeatureCount() int32
func (*RouteSummary) GetPointCount ¶
func (x *RouteSummary) GetPointCount() int32
func (*RouteSummary) ProtoMessage ¶
func (*RouteSummary) ProtoMessage()
func (*RouteSummary) ProtoReflect ¶
func (x *RouteSummary) ProtoReflect() protoreflect.Message
func (*RouteSummary) Reset ¶
func (x *RouteSummary) Reset()
func (*RouteSummary) String ¶
func (x *RouteSummary) String() string
type TrackingClient ¶
type TrackingClient interface { // Obtains the feature at a given position. GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) // Obtains the Features available within the given Rectangle. Results are // streamed rather than returned at once (e.g. in a response message with a // repeated field), as the rectangle may cover a large area and contain a // huge number of features. ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (Tracking_ListFeaturesClient, error) // Accepts a stream of Points on a route being traversed, returning a // RouteSummary when traversal is completed. RecordRoute(ctx context.Context, opts ...grpc.CallOption) (Tracking_RecordRouteClient, error) // Accepts a stream of RouteNotes sent while a route is being traversed, // while receiving other RouteNotes (e.g. from other users). RouteChat(ctx context.Context, opts ...grpc.CallOption) (Tracking_RouteChatClient, error) }
TrackingClient is the client API for Tracking service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTrackingClient ¶
func NewTrackingClient(cc grpc.ClientConnInterface) TrackingClient
type TrackingServer ¶
type TrackingServer interface { // Obtains the feature at a given position. GetFeature(context.Context, *Point) (*Feature, error) // Obtains the Features available within the given Rectangle. Results are // streamed rather than returned at once (e.g. in a response message with a // repeated field), as the rectangle may cover a large area and contain a // huge number of features. ListFeatures(*Rectangle, Tracking_ListFeaturesServer) error // Accepts a stream of Points on a route being traversed, returning a // RouteSummary when traversal is completed. RecordRoute(Tracking_RecordRouteServer) error // Accepts a stream of RouteNotes sent while a route is being traversed, // while receiving other RouteNotes (e.g. from other users). RouteChat(Tracking_RouteChatServer) error // contains filtered or unexported methods }
TrackingServer is the server API for Tracking service. All implementations must embed UnimplementedTrackingServer for forward compatibility
type Tracking_ListFeaturesClient ¶
type Tracking_ListFeaturesClient interface { Recv() (*Feature, error) grpc.ClientStream }
type Tracking_ListFeaturesServer ¶
type Tracking_ListFeaturesServer interface { Send(*Feature) error grpc.ServerStream }
type Tracking_RecordRouteClient ¶
type Tracking_RecordRouteClient interface { Send(*Point) error CloseAndRecv() (*RouteSummary, error) grpc.ClientStream }
type Tracking_RecordRouteServer ¶
type Tracking_RecordRouteServer interface { SendAndClose(*RouteSummary) error Recv() (*Point, error) grpc.ServerStream }
type UnimplementedTrackingServer ¶
type UnimplementedTrackingServer struct { }
UnimplementedTrackingServer must be embedded to have forward compatible implementations.
func (UnimplementedTrackingServer) GetFeature ¶
func (UnimplementedTrackingServer) ListFeatures ¶
func (UnimplementedTrackingServer) ListFeatures(*Rectangle, Tracking_ListFeaturesServer) error
func (UnimplementedTrackingServer) RecordRoute ¶
func (UnimplementedTrackingServer) RecordRoute(Tracking_RecordRouteServer) error
func (UnimplementedTrackingServer) RouteChat ¶
func (UnimplementedTrackingServer) RouteChat(Tracking_RouteChatServer) error
type UnsafeTrackingServer ¶
type UnsafeTrackingServer interface {
// contains filtered or unexported methods
}
UnsafeTrackingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrackingServer will result in compilation errors.