✨ Push stream able to get which request success
⬆️ Upgrade protobuf version
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v5.28.2
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// source: stream.proto
|
||||
|
||||
package proto
|
||||
@@ -15,8 +15,14 @@ import (
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
StreamService_CountStreamConnection_FullMethodName = "/proto.StreamService/CountStreamConnection"
|
||||
StreamService_PushStream_FullMethodName = "/proto.StreamService/PushStream"
|
||||
StreamService_PushStreamBatch_FullMethodName = "/proto.StreamService/PushStreamBatch"
|
||||
)
|
||||
|
||||
// StreamServiceClient is the client API for StreamService service.
|
||||
//
|
||||
@@ -36,8 +42,9 @@ func NewStreamServiceClient(cc grpc.ClientConnInterface) StreamServiceClient {
|
||||
}
|
||||
|
||||
func (c *streamServiceClient) CountStreamConnection(ctx context.Context, in *CountConnectionRequest, opts ...grpc.CallOption) (*CountConnectionResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CountConnectionResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.StreamService/CountStreamConnection", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, StreamService_CountStreamConnection_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -45,8 +52,9 @@ func (c *streamServiceClient) CountStreamConnection(ctx context.Context, in *Cou
|
||||
}
|
||||
|
||||
func (c *streamServiceClient) PushStream(ctx context.Context, in *PushStreamRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PushStreamResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.StreamService/PushStream", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, StreamService_PushStream_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -54,8 +62,9 @@ func (c *streamServiceClient) PushStream(ctx context.Context, in *PushStreamRequ
|
||||
}
|
||||
|
||||
func (c *streamServiceClient) PushStreamBatch(ctx context.Context, in *PushStreamBatchRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PushStreamResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.StreamService/PushStreamBatch", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, StreamService_PushStreamBatch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -64,7 +73,7 @@ func (c *streamServiceClient) PushStreamBatch(ctx context.Context, in *PushStrea
|
||||
|
||||
// StreamServiceServer is the server API for StreamService service.
|
||||
// All implementations must embed UnimplementedStreamServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type StreamServiceServer interface {
|
||||
CountStreamConnection(context.Context, *CountConnectionRequest) (*CountConnectionResponse, error)
|
||||
PushStream(context.Context, *PushStreamRequest) (*PushStreamResponse, error)
|
||||
@@ -72,9 +81,12 @@ type StreamServiceServer interface {
|
||||
mustEmbedUnimplementedStreamServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedStreamServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedStreamServiceServer struct {
|
||||
}
|
||||
// UnimplementedStreamServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedStreamServiceServer struct{}
|
||||
|
||||
func (UnimplementedStreamServiceServer) CountStreamConnection(context.Context, *CountConnectionRequest) (*CountConnectionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CountStreamConnection not implemented")
|
||||
@@ -86,6 +98,7 @@ func (UnimplementedStreamServiceServer) PushStreamBatch(context.Context, *PushSt
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PushStreamBatch not implemented")
|
||||
}
|
||||
func (UnimplementedStreamServiceServer) mustEmbedUnimplementedStreamServiceServer() {}
|
||||
func (UnimplementedStreamServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeStreamServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to StreamServiceServer will
|
||||
@@ -95,6 +108,13 @@ type UnsafeStreamServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedStreamServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&StreamService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -108,7 +128,7 @@ func _StreamService_CountStreamConnection_Handler(srv interface{}, ctx context.C
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.StreamService/CountStreamConnection",
|
||||
FullMethod: StreamService_CountStreamConnection_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StreamServiceServer).CountStreamConnection(ctx, req.(*CountConnectionRequest))
|
||||
@@ -126,7 +146,7 @@ func _StreamService_PushStream_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.StreamService/PushStream",
|
||||
FullMethod: StreamService_PushStream_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StreamServiceServer).PushStream(ctx, req.(*PushStreamRequest))
|
||||
@@ -144,7 +164,7 @@ func _StreamService_PushStreamBatch_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.StreamService/PushStreamBatch",
|
||||
FullMethod: StreamService_PushStreamBatch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StreamServiceServer).PushStreamBatch(ctx, req.(*PushStreamBatchRequest))
|
||||
|
Reference in New Issue
Block a user