Documentation ¶
Index ¶
- Variables
- func RegisterHealthServer(s *grpc.Server, srv HealthServer)
- func RegisterRouteGuideServer(s *grpc.Server, srv RouteGuideServer)
- type Feature
- func (m *Feature) Copy() *Feature
- func (m *Feature) CopyFrom(src interface{})
- func (*Feature) Descriptor() ([]byte, []int)
- func (m *Feature) Marshal() (dAtA []byte, err error)
- func (m *Feature) MarshalTo(dAtA []byte) (int, error)
- func (*Feature) ProtoMessage()
- func (m *Feature) Reset()
- func (m *Feature) Size() (n int)
- func (this *Feature) String() string
- func (m *Feature) Unmarshal(dAtA []byte) error
- func (m *Feature) XXX_DiscardUnknown()
- func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Feature) XXX_Merge(src proto.Message)
- func (m *Feature) XXX_Size() int
- func (m *Feature) XXX_Unmarshal(b []byte) error
- type HealthCheckRequest
- func (m *HealthCheckRequest) Copy() *HealthCheckRequest
- func (m *HealthCheckRequest) CopyFrom(src interface{})
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)
- func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error)
- func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error)
- func (*HealthCheckRequest) ProtoMessage()
- func (m *HealthCheckRequest) Reset()
- func (m *HealthCheckRequest) Size() (n int)
- func (this *HealthCheckRequest) String() string
- func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error
- func (m *HealthCheckRequest) XXX_DiscardUnknown()
- func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
- func (m *HealthCheckRequest) XXX_Size() int
- func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse
- func (m *HealthCheckResponse) Copy() *HealthCheckResponse
- func (m *HealthCheckResponse) CopyFrom(src interface{})
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)
- func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error)
- func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error)
- func (*HealthCheckResponse) ProtoMessage()
- func (m *HealthCheckResponse) Reset()
- func (m *HealthCheckResponse) Size() (n int)
- func (this *HealthCheckResponse) String() string
- func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error
- func (m *HealthCheckResponse) XXX_DiscardUnknown()
- func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
- func (m *HealthCheckResponse) XXX_Size() int
- func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse_ServingStatus
- type HealthClient
- type HealthServer
- type Point
- func (m *Point) Copy() *Point
- func (m *Point) CopyFrom(src interface{})
- func (*Point) Descriptor() ([]byte, []int)
- func (m *Point) Marshal() (dAtA []byte, err error)
- func (m *Point) MarshalTo(dAtA []byte) (int, error)
- func (*Point) ProtoMessage()
- func (m *Point) Reset()
- func (m *Point) Size() (n int)
- func (this *Point) String() string
- func (m *Point) Unmarshal(dAtA []byte) error
- func (m *Point) XXX_DiscardUnknown()
- func (m *Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Point) XXX_Merge(src proto.Message)
- func (m *Point) XXX_Size() int
- func (m *Point) XXX_Unmarshal(b []byte) error
- type Rectangle
- func (m *Rectangle) Copy() *Rectangle
- func (m *Rectangle) CopyFrom(src interface{})
- func (*Rectangle) Descriptor() ([]byte, []int)
- func (m *Rectangle) Marshal() (dAtA []byte, err error)
- func (m *Rectangle) MarshalTo(dAtA []byte) (int, error)
- func (*Rectangle) ProtoMessage()
- func (m *Rectangle) Reset()
- func (m *Rectangle) Size() (n int)
- func (this *Rectangle) String() string
- func (m *Rectangle) Unmarshal(dAtA []byte) error
- func (m *Rectangle) XXX_DiscardUnknown()
- func (m *Rectangle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Rectangle) XXX_Merge(src proto.Message)
- func (m *Rectangle) XXX_Size() int
- func (m *Rectangle) XXX_Unmarshal(b []byte) error
- type RouteGuideClient
- type RouteGuideServer
- type RouteGuide_ListFeaturesClient
- type RouteGuide_ListFeaturesServer
- type RouteGuide_ListFeaturesServerWrapper
- type RouteGuide_RecordRouteClient
- type RouteGuide_RecordRouteServer
- type RouteGuide_RecordRouteServerWrapper
- type RouteGuide_RouteChatClient
- type RouteGuide_RouteChatServer
- type RouteGuide_RouteChatServerWrapper
- type RouteNote
- func (m *RouteNote) Copy() *RouteNote
- func (m *RouteNote) CopyFrom(src interface{})
- func (*RouteNote) Descriptor() ([]byte, []int)
- func (m *RouteNote) Marshal() (dAtA []byte, err error)
- func (m *RouteNote) MarshalTo(dAtA []byte) (int, error)
- func (*RouteNote) ProtoMessage()
- func (m *RouteNote) Reset()
- func (m *RouteNote) Size() (n int)
- func (this *RouteNote) String() string
- func (m *RouteNote) Unmarshal(dAtA []byte) error
- func (m *RouteNote) XXX_DiscardUnknown()
- func (m *RouteNote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RouteNote) XXX_Merge(src proto.Message)
- func (m *RouteNote) XXX_Size() int
- func (m *RouteNote) XXX_Unmarshal(b []byte) error
- type RouteSummary
- func (m *RouteSummary) Copy() *RouteSummary
- func (m *RouteSummary) CopyFrom(src interface{})
- func (*RouteSummary) Descriptor() ([]byte, []int)
- func (m *RouteSummary) Marshal() (dAtA []byte, err error)
- func (m *RouteSummary) MarshalTo(dAtA []byte) (int, error)
- func (*RouteSummary) ProtoMessage()
- func (m *RouteSummary) Reset()
- func (m *RouteSummary) Size() (n int)
- func (this *RouteSummary) String() string
- func (m *RouteSummary) Unmarshal(dAtA []byte) error
- func (m *RouteSummary) XXX_DiscardUnknown()
- func (m *RouteSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RouteSummary) XXX_Merge(src proto.Message)
- func (m *RouteSummary) XXX_Size() int
- func (m *RouteSummary) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowService = fmt.Errorf("proto: integer overflow") )
var HealthCheckResponse_ServingStatus_name = map[int32]string{
0: "UNKNOWN",
1: "SERVING",
2: "NOT_SERVING",
}
var HealthCheckResponse_ServingStatus_value = map[string]int32{
"UNKNOWN": 0,
"SERVING": 1,
"NOT_SERVING": 2,
}
Functions ¶
func RegisterHealthServer ¶
func RegisterHealthServer(s *grpc.Server, srv HealthServer)
func RegisterRouteGuideServer ¶
func RegisterRouteGuideServer(s *grpc.Server, srv RouteGuideServer)
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"` }
A feature names something at a given point.
If a feature could not be named, the name is empty.
func (*Feature) Descriptor ¶
func (*Feature) ProtoMessage ¶
func (*Feature) ProtoMessage()
func (*Feature) XXX_DiscardUnknown ¶
func (m *Feature) XXX_DiscardUnknown()
func (*Feature) XXX_Marshal ¶
func (*Feature) XXX_Unmarshal ¶
type HealthCheckRequest ¶
type HealthCheckRequest struct {
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
}
func (*HealthCheckRequest) Copy ¶
func (m *HealthCheckRequest) Copy() *HealthCheckRequest
func (*HealthCheckRequest) CopyFrom ¶
func (m *HealthCheckRequest) CopyFrom(src interface{})
func (*HealthCheckRequest) Descriptor ¶
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
func (*HealthCheckRequest) Marshal ¶
func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error)
func (*HealthCheckRequest) MarshalTo ¶
func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error)
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) Reset ¶
func (m *HealthCheckRequest) Reset()
func (*HealthCheckRequest) Size ¶
func (m *HealthCheckRequest) Size() (n int)
func (*HealthCheckRequest) String ¶
func (this *HealthCheckRequest) String() string
func (*HealthCheckRequest) Unmarshal ¶
func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error
func (*HealthCheckRequest) XXX_DiscardUnknown ¶
func (m *HealthCheckRequest) XXX_DiscardUnknown()
func (*HealthCheckRequest) XXX_Marshal ¶
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckRequest) XXX_Merge ¶
func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
func (*HealthCheckRequest) XXX_Size ¶
func (m *HealthCheckRequest) XXX_Size() int
func (*HealthCheckRequest) XXX_Unmarshal ¶
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=routeguide.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
}
func (*HealthCheckResponse) Copy ¶
func (m *HealthCheckResponse) Copy() *HealthCheckResponse
func (*HealthCheckResponse) CopyFrom ¶
func (m *HealthCheckResponse) CopyFrom(src interface{})
func (*HealthCheckResponse) Descriptor ¶
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) Marshal ¶
func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error)
func (*HealthCheckResponse) MarshalTo ¶
func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error)
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) Reset ¶
func (m *HealthCheckResponse) Reset()
func (*HealthCheckResponse) Size ¶
func (m *HealthCheckResponse) Size() (n int)
func (*HealthCheckResponse) String ¶
func (this *HealthCheckResponse) String() string
func (*HealthCheckResponse) Unmarshal ¶
func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error
func (*HealthCheckResponse) XXX_DiscardUnknown ¶
func (m *HealthCheckResponse) XXX_DiscardUnknown()
func (*HealthCheckResponse) XXX_Marshal ¶
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckResponse) XXX_Merge ¶
func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
func (*HealthCheckResponse) XXX_Size ¶
func (m *HealthCheckResponse) XXX_Size() int
func (*HealthCheckResponse) XXX_Unmarshal ¶
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
type HealthCheckResponse_ServingStatus ¶
type HealthCheckResponse_ServingStatus int32
const ( HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 )
func (HealthCheckResponse_ServingStatus) EnumDescriptor ¶
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
type HealthClient ¶
type HealthClient interface {
Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}
HealthClient is the client API for Health service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHealthClient ¶
func NewHealthClient(cc *grpc.ClientConn) HealthClient
type HealthServer ¶
type HealthServer interface {
Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
}
HealthServer is the server API for Health service.
func NewAuthenticatedWrapperHealthServer ¶
func NewAuthenticatedWrapperHealthServer(local HealthServer, authorize func(context.Context, []string) error) HealthServer
func NewRaftProxyHealthServer ¶
func NewRaftProxyHealthServer(local HealthServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) HealthServer
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"` }
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 ¶
func (*Point) ProtoMessage ¶
func (*Point) ProtoMessage()
func (*Point) XXX_DiscardUnknown ¶
func (m *Point) XXX_DiscardUnknown()
func (*Point) XXX_Marshal ¶
func (*Point) XXX_Unmarshal ¶
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"` }
A latitude-longitude rectangle, represented as two diagonally opposite points "lo" and "hi".
func (*Rectangle) Descriptor ¶
func (*Rectangle) ProtoMessage ¶
func (*Rectangle) ProtoMessage()
func (*Rectangle) XXX_DiscardUnknown ¶
func (m *Rectangle) XXX_DiscardUnknown()
func (*Rectangle) XXX_Marshal ¶
func (*Rectangle) XXX_Unmarshal ¶
type RouteGuideClient ¶
type RouteGuideClient interface { // A simple RPC. // // Obtains the feature at a given position. // // A feature with an empty name is returned if there's no feature at the given // position. GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) // A server-to-client streaming RPC. // // 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) (RouteGuide_ListFeaturesClient, error) // A client-to-server streaming RPC. // // Accepts a stream of Points on a route being traversed, returning a // RouteSummary when traversal is completed. RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error) // A Bidirectional streaming RPC. // // 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) (RouteGuide_RouteChatClient, error) }
RouteGuideClient is the client API for RouteGuide service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRouteGuideClient ¶
func NewRouteGuideClient(cc *grpc.ClientConn) RouteGuideClient
type RouteGuideServer ¶
type RouteGuideServer interface { // A simple RPC. // // Obtains the feature at a given position. // // A feature with an empty name is returned if there's no feature at the given // position. GetFeature(context.Context, *Point) (*Feature, error) // A server-to-client streaming RPC. // // 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, RouteGuide_ListFeaturesServer) error // A client-to-server streaming RPC. // // Accepts a stream of Points on a route being traversed, returning a // RouteSummary when traversal is completed. RecordRoute(RouteGuide_RecordRouteServer) error // A Bidirectional streaming RPC. // // Accepts a stream of RouteNotes sent while a route is being traversed, // while receiving other RouteNotes (e.g. from other users). RouteChat(RouteGuide_RouteChatServer) error }
RouteGuideServer is the server API for RouteGuide service.
func NewAuthenticatedWrapperRouteGuideServer ¶
func NewAuthenticatedWrapperRouteGuideServer(local RouteGuideServer, authorize func(context.Context, []string) error) RouteGuideServer
func NewRaftProxyRouteGuideServer ¶
func NewRaftProxyRouteGuideServer(local RouteGuideServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) RouteGuideServer
type RouteGuide_ListFeaturesClient ¶
type RouteGuide_ListFeaturesClient interface { Recv() (*Feature, error) grpc.ClientStream }
type RouteGuide_ListFeaturesServer ¶
type RouteGuide_ListFeaturesServer interface { Send(*Feature) error grpc.ServerStream }
type RouteGuide_ListFeaturesServerWrapper ¶
type RouteGuide_ListFeaturesServerWrapper struct { RouteGuide_ListFeaturesServer // contains filtered or unexported fields }
func (RouteGuide_ListFeaturesServerWrapper) Context ¶
func (s RouteGuide_ListFeaturesServerWrapper) Context() context.Context
type RouteGuide_RecordRouteClient ¶
type RouteGuide_RecordRouteClient interface { Send(*Point) error CloseAndRecv() (*RouteSummary, error) grpc.ClientStream }
type RouteGuide_RecordRouteServer ¶
type RouteGuide_RecordRouteServer interface { SendAndClose(*RouteSummary) error Recv() (*Point, error) grpc.ServerStream }
type RouteGuide_RecordRouteServerWrapper ¶
type RouteGuide_RecordRouteServerWrapper struct { RouteGuide_RecordRouteServer // contains filtered or unexported fields }
func (RouteGuide_RecordRouteServerWrapper) Context ¶
func (s RouteGuide_RecordRouteServerWrapper) Context() context.Context
type RouteGuide_RouteChatServerWrapper ¶
type RouteGuide_RouteChatServerWrapper struct { RouteGuide_RouteChatServer // contains filtered or unexported fields }
func (RouteGuide_RouteChatServerWrapper) Context ¶
func (s RouteGuide_RouteChatServerWrapper) Context() context.Context
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"` }
A RouteNote is a message sent while at a given point.
func (*RouteNote) Descriptor ¶
func (*RouteNote) ProtoMessage ¶
func (*RouteNote) ProtoMessage()
func (*RouteNote) XXX_DiscardUnknown ¶
func (m *RouteNote) XXX_DiscardUnknown()
func (*RouteNote) XXX_Marshal ¶
func (*RouteNote) XXX_Unmarshal ¶
type RouteSummary ¶
type RouteSummary struct { // The number of points received. PointCount int32 `protobuf:"varint,1,opt,name=point_count,json=pointCount,proto3" json:"point_count,omitempty"` // The number of known features passed while traversing the route. FeatureCount int32 `protobuf:"varint,2,opt,name=feature_count,json=featureCount,proto3" json:"feature_count,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=elapsed_time,json=elapsedTime,proto3" json:"elapsed_time,omitempty"` }
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) Copy ¶
func (m *RouteSummary) Copy() *RouteSummary
func (*RouteSummary) CopyFrom ¶
func (m *RouteSummary) CopyFrom(src interface{})
func (*RouteSummary) Descriptor ¶
func (*RouteSummary) Descriptor() ([]byte, []int)
func (*RouteSummary) Marshal ¶
func (m *RouteSummary) Marshal() (dAtA []byte, err error)
func (*RouteSummary) ProtoMessage ¶
func (*RouteSummary) ProtoMessage()
func (*RouteSummary) Reset ¶
func (m *RouteSummary) Reset()
func (*RouteSummary) Size ¶
func (m *RouteSummary) Size() (n int)
func (*RouteSummary) String ¶
func (this *RouteSummary) String() string
func (*RouteSummary) Unmarshal ¶
func (m *RouteSummary) Unmarshal(dAtA []byte) error
func (*RouteSummary) XXX_DiscardUnknown ¶
func (m *RouteSummary) XXX_DiscardUnknown()
func (*RouteSummary) XXX_Marshal ¶
func (m *RouteSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RouteSummary) XXX_Merge ¶
func (m *RouteSummary) XXX_Merge(src proto.Message)
func (*RouteSummary) XXX_Size ¶
func (m *RouteSummary) XXX_Size() int
func (*RouteSummary) XXX_Unmarshal ¶
func (m *RouteSummary) XXX_Unmarshal(b []byte) error