Documentation ¶
Index ¶
- Variables
- func RegisterRouteServer(s grpc.ServiceRegistrar, srv RouteServer)
- type Feature
- type Point
- type Rectangle
- type RouteClient
- type RouteNote
- type RouteServer
- 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 Route_ListFeaturesClient
- type Route_ListFeaturesServer
- type Route_RecordRouteClient
- type Route_RecordRouteServer
- type Route_RouteChatClient
- type Route_RouteChatServer
- type UnimplementedRouteServer
- func (UnimplementedRouteServer) GetFeature(context.Context, *Point) (*Feature, error)
- func (UnimplementedRouteServer) ListFeatures(*Rectangle, Route_ListFeaturesServer) error
- func (UnimplementedRouteServer) RecordRoute(Route_RecordRouteServer) error
- func (UnimplementedRouteServer) RouteChat(Route_RouteChatServer) error
- type UnsafeRouteServer
Constants ¶
This section is empty.
Variables ¶
var File_route_proto protoreflect.FileDescriptor
var Route_ServiceDesc = grpc.ServiceDesc{ ServiceName: "route.Route", HandlerType: (*RouteServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFeature", Handler: _Route_GetFeature_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListFeatures", Handler: _Route_ListFeatures_Handler, ServerStreams: true, }, { StreamName: "RecordRoute", Handler: _Route_RecordRoute_Handler, ClientStreams: true, }, { StreamName: "RouteChat", Handler: _Route_RouteChat_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "route.proto", }
Route_ServiceDesc is the grpc.ServiceDesc for Route service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRouteServer ¶
func RegisterRouteServer(s grpc.ServiceRegistrar, srv RouteServer)
Types ¶
type Feature ¶
type Feature struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Location *Point `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` // contains filtered or unexported fields }
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 }
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 { Lo *Point `protobuf:"bytes,1,opt,name=lo,proto3" json:"lo,omitempty"` Hi *Point `protobuf:"bytes,2,opt,name=hi,proto3" json:"hi,omitempty"` // contains filtered or unexported fields }
func (*Rectangle) Descriptor
deprecated
func (*Rectangle) ProtoMessage ¶
func (*Rectangle) ProtoMessage()
func (*Rectangle) ProtoReflect ¶
func (x *Rectangle) ProtoReflect() protoreflect.Message
type RouteClient ¶
type RouteClient interface { GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (Route_ListFeaturesClient, error) RecordRoute(ctx context.Context, opts ...grpc.CallOption) (Route_RecordRouteClient, error) RouteChat(ctx context.Context, opts ...grpc.CallOption) (Route_RouteChatClient, error) }
RouteClient is the client API for Route 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 NewRouteClient ¶
func NewRouteClient(cc grpc.ClientConnInterface) RouteClient
type RouteNote ¶
type RouteNote struct { Location *Point `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
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 RouteServer ¶
type RouteServer interface { GetFeature(context.Context, *Point) (*Feature, error) ListFeatures(*Rectangle, Route_ListFeaturesServer) error RecordRoute(Route_RecordRouteServer) error RouteChat(Route_RouteChatServer) error // contains filtered or unexported methods }
RouteServer is the server API for Route service. All implementations must embed UnimplementedRouteServer for forward compatibility
type RouteSummary ¶
type RouteSummary struct { PointCount int32 `protobuf:"varint,1,opt,name=point_count,json=pointCount,proto3" json:"point_count,omitempty"` FeatureCount int32 `protobuf:"varint,2,opt,name=feature_count,json=featureCount,proto3" json:"feature_count,omitempty"` Distance int32 `protobuf:"varint,3,opt,name=distance,proto3" json:"distance,omitempty"` ElapsedTime int32 `protobuf:"varint,4,opt,name=elapsed_time,json=elapsedTime,proto3" json:"elapsed_time,omitempty"` // contains filtered or unexported fields }
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 Route_ListFeaturesClient ¶
type Route_ListFeaturesClient interface { Recv() (*Feature, error) grpc.ClientStream }
type Route_ListFeaturesServer ¶
type Route_ListFeaturesServer interface { Send(*Feature) error grpc.ServerStream }
type Route_RecordRouteClient ¶
type Route_RecordRouteClient interface { Send(*Point) error CloseAndRecv() (*RouteSummary, error) grpc.ClientStream }
type Route_RecordRouteServer ¶
type Route_RecordRouteServer interface { SendAndClose(*RouteSummary) error Recv() (*Point, error) grpc.ServerStream }
type Route_RouteChatClient ¶
type Route_RouteChatServer ¶
type UnimplementedRouteServer ¶
type UnimplementedRouteServer struct { }
UnimplementedRouteServer must be embedded to have forward compatible implementations.
func (UnimplementedRouteServer) GetFeature ¶
func (UnimplementedRouteServer) ListFeatures ¶
func (UnimplementedRouteServer) ListFeatures(*Rectangle, Route_ListFeaturesServer) error
func (UnimplementedRouteServer) RecordRoute ¶
func (UnimplementedRouteServer) RecordRoute(Route_RecordRouteServer) error
func (UnimplementedRouteServer) RouteChat ¶
func (UnimplementedRouteServer) RouteChat(Route_RouteChatServer) error
type UnsafeRouteServer ¶ added in v0.0.2
type UnsafeRouteServer interface {
// contains filtered or unexported methods
}
UnsafeRouteServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RouteServer will result in compilation errors.