Documentation ¶
Overview ¶
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterObjDetectHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterObjDetectHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ObjDetectClient) error
- func RegisterObjDetectHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterObjDetectHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ObjDetectServer) error
- func RegisterObjDetectServer(s grpc.ServiceRegistrar, srv ObjDetectServer)
- type HealthzResponse
- func (*HealthzResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthzResponse) GetHtime() *timestamppb.Timestamp
- func (x *HealthzResponse) GetState() string
- func (*HealthzResponse) ProtoMessage()
- func (x *HealthzResponse) ProtoReflect() protoreflect.Message
- func (x *HealthzResponse) Reset()
- func (x *HealthzResponse) String() string
- type JpgBytes
- func (*JpgBytes) Descriptor() ([]byte, []int)deprecated
- func (x *JpgBytes) GetJpgData() []byte
- func (x *JpgBytes) GetSrcID() string
- func (x *JpgBytes) GetSrcTs() int64
- func (*JpgBytes) ProtoMessage()
- func (x *JpgBytes) ProtoReflect() protoreflect.Message
- func (x *JpgBytes) Reset()
- func (x *JpgBytes) String() string
- type ObjDetectClient
- type ObjDetectServer
- type ObjDetect_DetectJpgStreamClient
- type ObjDetect_DetectJpgStreamServer
- type UnimplementedObjDetectServer
- type UnsafeObjDetectServer
Constants ¶
This section is empty.
Variables ¶
var File_yolosvc_proto protoreflect.FileDescriptor
var ObjDetect_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chengwu.yolosvc.v1.ObjDetect", HandlerType: (*ObjDetectServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DetectOneJpg", Handler: _ObjDetect_DetectOneJpg_Handler, }, { MethodName: "Healthz", Handler: _ObjDetect_Healthz_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "DetectJpgStream", Handler: _ObjDetect_DetectJpgStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "yolosvc.proto", }
ObjDetect_ServiceDesc is the grpc.ServiceDesc for ObjDetect service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterObjDetectHandler ¶
func RegisterObjDetectHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterObjDetectHandler registers the http handlers for service ObjDetect to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterObjDetectHandlerClient ¶
func RegisterObjDetectHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ObjDetectClient) error
RegisterObjDetectHandlerClient registers the http handlers for service ObjDetect to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ObjDetectClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ObjDetectClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ObjDetectClient" to call the correct interceptors.
func RegisterObjDetectHandlerFromEndpoint ¶
func RegisterObjDetectHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterObjDetectHandlerFromEndpoint is same as RegisterObjDetectHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterObjDetectHandlerServer ¶
func RegisterObjDetectHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ObjDetectServer) error
RegisterObjDetectHandlerServer registers the http handlers for service ObjDetect to "mux". UnaryRPC :call ObjDetectServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterObjDetectHandlerFromEndpoint instead.
func RegisterObjDetectServer ¶
func RegisterObjDetectServer(s grpc.ServiceRegistrar, srv ObjDetectServer)
Types ¶
type HealthzResponse ¶
type HealthzResponse struct { State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` Htime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=htime,proto3" json:"htime,omitempty"` // contains filtered or unexported fields }
func (*HealthzResponse) Descriptor
deprecated
func (*HealthzResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthzResponse.ProtoReflect.Descriptor instead.
func (*HealthzResponse) GetHtime ¶
func (x *HealthzResponse) GetHtime() *timestamppb.Timestamp
func (*HealthzResponse) GetState ¶
func (x *HealthzResponse) GetState() string
func (*HealthzResponse) ProtoMessage ¶
func (*HealthzResponse) ProtoMessage()
func (*HealthzResponse) ProtoReflect ¶
func (x *HealthzResponse) ProtoReflect() protoreflect.Message
func (*HealthzResponse) Reset ¶
func (x *HealthzResponse) Reset()
func (*HealthzResponse) String ¶
func (x *HealthzResponse) String() string
type JpgBytes ¶
type JpgBytes struct { SrcID string `protobuf:"bytes,1,opt,name=srcID,proto3" json:"srcID,omitempty"` SrcTs int64 `protobuf:"varint,2,opt,name=srcTs,proto3" json:"srcTs,omitempty"` // unixnano timestamp JpgData []byte `protobuf:"bytes,3,opt,name=jpgData,proto3" json:"jpgData,omitempty"` // contains filtered or unexported fields }
func (*JpgBytes) Descriptor
deprecated
func (*JpgBytes) GetJpgData ¶
func (*JpgBytes) ProtoMessage ¶
func (*JpgBytes) ProtoMessage()
func (*JpgBytes) ProtoReflect ¶
func (x *JpgBytes) ProtoReflect() protoreflect.Message
type ObjDetectClient ¶
type ObjDetectClient interface { DetectOneJpg(ctx context.Context, in *JpgBytes, opts ...grpc.CallOption) (*JpgBytes, error) DetectJpgStream(ctx context.Context, opts ...grpc.CallOption) (ObjDetect_DetectJpgStreamClient, error) Healthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthzResponse, error) }
ObjDetectClient is the client API for ObjDetect 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 NewObjDetectClient ¶
func NewObjDetectClient(cc grpc.ClientConnInterface) ObjDetectClient
type ObjDetectServer ¶
type ObjDetectServer interface { DetectOneJpg(context.Context, *JpgBytes) (*JpgBytes, error) DetectJpgStream(ObjDetect_DetectJpgStreamServer) error Healthz(context.Context, *emptypb.Empty) (*HealthzResponse, error) // contains filtered or unexported methods }
ObjDetectServer is the server API for ObjDetect service. All implementations must embed UnimplementedObjDetectServer for forward compatibility
type UnimplementedObjDetectServer ¶
type UnimplementedObjDetectServer struct { }
UnimplementedObjDetectServer must be embedded to have forward compatible implementations.
func (UnimplementedObjDetectServer) DetectJpgStream ¶
func (UnimplementedObjDetectServer) DetectJpgStream(ObjDetect_DetectJpgStreamServer) error
func (UnimplementedObjDetectServer) DetectOneJpg ¶
func (UnimplementedObjDetectServer) Healthz ¶
func (UnimplementedObjDetectServer) Healthz(context.Context, *emptypb.Empty) (*HealthzResponse, error)
type UnsafeObjDetectServer ¶
type UnsafeObjDetectServer interface {
// contains filtered or unexported methods
}
UnsafeObjDetectServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ObjDetectServer will result in compilation errors.