Documentation ¶
Index ¶
- type RouteGuide
- func (r *RouteGuide) GetFeature(ctx context.Context, point *pb.Point, feature *pb.Feature) error
- func (r *RouteGuide) ListFeatures(ctx context.Context, rect *pb.Rectangle, ...) error
- func (r *RouteGuide) RecordRoute(ctx context.Context, stream pb.RouteGuide_RecordRouteStream) error
- func (r *RouteGuide) RouteChat(ctx context.Context, stream pb.RouteGuide_RouteChatStream) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouteGuide ¶
type RouteGuide struct { Features []*pb.Feature Notes map[string][]*pb.RouteNote NotesLock sync.Mutex }
RouteGuide implements the route guide handler interface
func (*RouteGuide) GetFeature ¶
GetFeature obtains the feature at a given position.
func (*RouteGuide) ListFeatures ¶
func (r *RouteGuide) ListFeatures(ctx context.Context, rect *pb.Rectangle, stream pb.RouteGuide_ListFeaturesStream) error
ListFeatures 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.
func (*RouteGuide) RecordRoute ¶
func (r *RouteGuide) RecordRoute(ctx context.Context, stream pb.RouteGuide_RecordRouteStream) error
RecordRoute accepts a stream of Points on a route being traversed, returning a RouteSummary when traversal is completed.
func (*RouteGuide) RouteChat ¶
func (r *RouteGuide) RouteChat(ctx context.Context, stream pb.RouteGuide_RouteChatStream) error
RouteChat accepts a stream of RouteNotes sent while a route is being traversed, while receiving other RouteNotes (e.g. from other users).
Click to show internal directories.
Click to hide internal directories.