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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDriverServiceServer ¶
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 ¶
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 ¶
func (*DriverLocation) Descriptor() ([]byte, []int)
func (*DriverLocation) GetDriverID ¶
func (m *DriverLocation) GetDriverID() string
func (*DriverLocation) GetLocation ¶
func (m *DriverLocation) GetLocation() string
func (*DriverLocation) ProtoMessage ¶
func (*DriverLocation) ProtoMessage()
func (*DriverLocation) Reset ¶
func (m *DriverLocation) Reset()
func (*DriverLocation) String ¶
func (m *DriverLocation) String() string
func (*DriverLocation) XXX_DiscardUnknown ¶
func (m *DriverLocation) XXX_DiscardUnknown()
func (*DriverLocation) XXX_Marshal ¶
func (m *DriverLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DriverLocation) XXX_Merge ¶
func (m *DriverLocation) XXX_Merge(src proto.Message)
func (*DriverLocation) XXX_Size ¶
func (m *DriverLocation) XXX_Size() int
func (*DriverLocation) XXX_Unmarshal ¶
func (m *DriverLocation) XXX_Unmarshal(b []byte) error
type DriverLocationRequest ¶
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 ¶
func (*DriverLocationRequest) Descriptor() ([]byte, []int)
func (*DriverLocationRequest) GetLocation ¶
func (m *DriverLocationRequest) GetLocation() string
func (*DriverLocationRequest) ProtoMessage ¶
func (*DriverLocationRequest) ProtoMessage()
func (*DriverLocationRequest) Reset ¶
func (m *DriverLocationRequest) Reset()
func (*DriverLocationRequest) String ¶
func (m *DriverLocationRequest) String() string
func (*DriverLocationRequest) XXX_DiscardUnknown ¶
func (m *DriverLocationRequest) XXX_DiscardUnknown()
func (*DriverLocationRequest) XXX_Marshal ¶
func (m *DriverLocationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DriverLocationRequest) XXX_Merge ¶
func (m *DriverLocationRequest) XXX_Merge(src proto.Message)
func (*DriverLocationRequest) XXX_Size ¶
func (m *DriverLocationRequest) XXX_Size() int
func (*DriverLocationRequest) XXX_Unmarshal ¶
func (m *DriverLocationRequest) XXX_Unmarshal(b []byte) error
type DriverLocationResponse ¶
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 ¶
func (*DriverLocationResponse) Descriptor() ([]byte, []int)
func (*DriverLocationResponse) GetLocations ¶
func (m *DriverLocationResponse) GetLocations() []*DriverLocation
func (*DriverLocationResponse) ProtoMessage ¶
func (*DriverLocationResponse) ProtoMessage()
func (*DriverLocationResponse) Reset ¶
func (m *DriverLocationResponse) Reset()
func (*DriverLocationResponse) String ¶
func (m *DriverLocationResponse) String() string
func (*DriverLocationResponse) XXX_DiscardUnknown ¶
func (m *DriverLocationResponse) XXX_DiscardUnknown()
func (*DriverLocationResponse) XXX_Marshal ¶
func (m *DriverLocationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DriverLocationResponse) XXX_Merge ¶
func (m *DriverLocationResponse) XXX_Merge(src proto.Message)
func (*DriverLocationResponse) XXX_Size ¶
func (m *DriverLocationResponse) XXX_Size() int
func (*DriverLocationResponse) XXX_Unmarshal ¶
func (m *DriverLocationResponse) XXX_Unmarshal(b []byte) error
type DriverServiceClient ¶
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 ¶
func NewDriverServiceClient(cc *grpc.ClientConn) DriverServiceClient
type DriverServiceServer ¶
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
Click to show internal directories.
Click to hide internal directories.