Documentation
¶
Index ¶
- func RegisterDriverServiceServer(s *grpc.Server, srv DriverServiceServer)
- type Client
- type Driver
- type DriverLocation
- func (*DriverLocation) Descriptor() ([]byte, []int)
- func (m *DriverLocation) GetDriverID() string
- func (m *DriverLocation) GetLocation() string
- func (*DriverLocation) ProtoMessage()
- func (m *DriverLocation) Reset()
- func (m *DriverLocation) String() string
- func (m *DriverLocation) XXX_DiscardUnknown()
- func (m *DriverLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DriverLocation) XXX_Merge(src proto.Message)
- func (m *DriverLocation) XXX_Size() int
- func (m *DriverLocation) XXX_Unmarshal(b []byte) error
- type DriverLocationRequest
- func (*DriverLocationRequest) Descriptor() ([]byte, []int)
- func (m *DriverLocationRequest) GetLocation() string
- func (*DriverLocationRequest) ProtoMessage()
- func (m *DriverLocationRequest) Reset()
- func (m *DriverLocationRequest) String() string
- func (m *DriverLocationRequest) XXX_DiscardUnknown()
- func (m *DriverLocationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DriverLocationRequest) XXX_Merge(src proto.Message)
- func (m *DriverLocationRequest) XXX_Size() int
- func (m *DriverLocationRequest) XXX_Unmarshal(b []byte) error
- type DriverLocationResponse
- func (*DriverLocationResponse) Descriptor() ([]byte, []int)
- func (m *DriverLocationResponse) GetLocations() []*DriverLocation
- func (*DriverLocationResponse) ProtoMessage()
- func (m *DriverLocationResponse) Reset()
- func (m *DriverLocationResponse) String() string
- func (m *DriverLocationResponse) XXX_DiscardUnknown()
- func (m *DriverLocationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DriverLocationResponse) XXX_Merge(src proto.Message)
- func (m *DriverLocationResponse) XXX_Size() int
- func (m *DriverLocationResponse) XXX_Unmarshal(b []byte) error
- type DriverServiceClient
- type DriverServiceServer
- type Interface
- type Redis
- type Server
- type UnimplementedDriverServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDriverServiceServer ¶ added in v1.19.0
func RegisterDriverServiceServer(s *grpc.Server, srv DriverServiceServer)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a remote client that implements driver.Interface
type DriverLocation ¶ added in v1.19.0
type DriverLocation struct { DriverID string `protobuf:"bytes,1,opt,name=driverID,proto3" json:"driverID,omitempty"` Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DriverLocation) Descriptor ¶ added in v1.19.0
func (*DriverLocation) Descriptor() ([]byte, []int)
func (*DriverLocation) GetDriverID ¶ added in v1.19.0
func (m *DriverLocation) GetDriverID() string
func (*DriverLocation) GetLocation ¶ added in v1.19.0
func (m *DriverLocation) GetLocation() string
func (*DriverLocation) ProtoMessage ¶ added in v1.19.0
func (*DriverLocation) ProtoMessage()
func (*DriverLocation) Reset ¶ added in v1.19.0
func (m *DriverLocation) Reset()
func (*DriverLocation) String ¶ added in v1.19.0
func (m *DriverLocation) String() string
func (*DriverLocation) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *DriverLocation) XXX_DiscardUnknown()
func (*DriverLocation) XXX_Marshal ¶ added in v1.19.0
func (m *DriverLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DriverLocation) XXX_Merge ¶ added in v1.19.0
func (m *DriverLocation) XXX_Merge(src proto.Message)
func (*DriverLocation) XXX_Size ¶ added in v1.19.0
func (m *DriverLocation) XXX_Size() int
func (*DriverLocation) XXX_Unmarshal ¶ added in v1.19.0
func (m *DriverLocation) XXX_Unmarshal(b []byte) error
type DriverLocationRequest ¶ added in v1.19.0
type DriverLocationRequest struct { Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DriverLocationRequest) Descriptor ¶ added in v1.19.0
func (*DriverLocationRequest) Descriptor() ([]byte, []int)
func (*DriverLocationRequest) GetLocation ¶ added in v1.19.0
func (m *DriverLocationRequest) GetLocation() string
func (*DriverLocationRequest) ProtoMessage ¶ added in v1.19.0
func (*DriverLocationRequest) ProtoMessage()
func (*DriverLocationRequest) Reset ¶ added in v1.19.0
func (m *DriverLocationRequest) Reset()
func (*DriverLocationRequest) String ¶ added in v1.19.0
func (m *DriverLocationRequest) String() string
func (*DriverLocationRequest) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *DriverLocationRequest) XXX_DiscardUnknown()
func (*DriverLocationRequest) XXX_Marshal ¶ added in v1.19.0
func (m *DriverLocationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DriverLocationRequest) XXX_Merge ¶ added in v1.19.0
func (m *DriverLocationRequest) XXX_Merge(src proto.Message)
func (*DriverLocationRequest) XXX_Size ¶ added in v1.19.0
func (m *DriverLocationRequest) XXX_Size() int
func (*DriverLocationRequest) XXX_Unmarshal ¶ added in v1.19.0
func (m *DriverLocationRequest) XXX_Unmarshal(b []byte) error
type DriverLocationResponse ¶ added in v1.19.0
type DriverLocationResponse struct { Locations []*DriverLocation `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DriverLocationResponse) Descriptor ¶ added in v1.19.0
func (*DriverLocationResponse) Descriptor() ([]byte, []int)
func (*DriverLocationResponse) GetLocations ¶ added in v1.19.0
func (m *DriverLocationResponse) GetLocations() []*DriverLocation
func (*DriverLocationResponse) ProtoMessage ¶ added in v1.19.0
func (*DriverLocationResponse) ProtoMessage()
func (*DriverLocationResponse) Reset ¶ added in v1.19.0
func (m *DriverLocationResponse) Reset()
func (*DriverLocationResponse) String ¶ added in v1.19.0
func (m *DriverLocationResponse) String() string
func (*DriverLocationResponse) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *DriverLocationResponse) XXX_DiscardUnknown()
func (*DriverLocationResponse) XXX_Marshal ¶ added in v1.19.0
func (m *DriverLocationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DriverLocationResponse) XXX_Merge ¶ added in v1.19.0
func (m *DriverLocationResponse) XXX_Merge(src proto.Message)
func (*DriverLocationResponse) XXX_Size ¶ added in v1.19.0
func (m *DriverLocationResponse) XXX_Size() int
func (*DriverLocationResponse) XXX_Unmarshal ¶ added in v1.19.0
func (m *DriverLocationResponse) XXX_Unmarshal(b []byte) error
type DriverServiceClient ¶ added in v1.19.0
type DriverServiceClient interface {
FindNearest(ctx context.Context, in *DriverLocationRequest, opts ...grpc.CallOption) (*DriverLocationResponse, error)
}
DriverServiceClient is the client API for DriverService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDriverServiceClient ¶ added in v1.19.0
func NewDriverServiceClient(cc *grpc.ClientConn) DriverServiceClient
type DriverServiceServer ¶ added in v1.19.0
type DriverServiceServer interface {
FindNearest(context.Context, *DriverLocationRequest) (*DriverLocationResponse, error)
}
DriverServiceServer is the server API for DriverService service.
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis is a simulator of remote Redis cache
func (*Redis) FindDriverIDs ¶
FindDriverIDs finds IDs of drivers who are near the location.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements jaeger-demo-frontend service
func NewServer ¶
func NewServer(hostPort string, otelExporter string, metricsFactory metrics.Factory, logger log.Factory) *Server
NewServer creates a new driver.Server
func (*Server) FindNearest ¶
func (s *Server) FindNearest(ctx context.Context, location *DriverLocationRequest) (*DriverLocationResponse, error)
FindNearest implements gRPC driver interface
type UnimplementedDriverServiceServer ¶ added in v1.53.0
type UnimplementedDriverServiceServer struct { }
UnimplementedDriverServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedDriverServiceServer) FindNearest ¶ added in v1.53.0
func (*UnimplementedDriverServiceServer) FindNearest(ctx context.Context, req *DriverLocationRequest) (*DriverLocationResponse, error)