2024-10-19 14:36:33 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2024-11-02 17:40:36 +00:00
// - protoc-gen-go-grpc v1.2.0
2024-10-19 14:36:33 +00:00
// - protoc v5.28.2
// source: stream.proto
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
2024-11-02 17:40:36 +00:00
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2024-10-19 14:36:33 +00:00
2024-10-21 14:07:36 +00:00
// StreamServiceClient is the client API for StreamService service.
2024-10-19 14:36:33 +00:00
//
// 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.
2024-10-21 14:07:36 +00:00
type StreamServiceClient interface {
2024-10-19 14:36:33 +00:00
CountStreamConnection ( ctx context . Context , in * CountConnectionRequest , opts ... grpc . CallOption ) ( * CountConnectionResponse , error )
PushStream ( ctx context . Context , in * PushStreamRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error )
PushStreamBatch ( ctx context . Context , in * PushStreamBatchRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error )
}
2024-10-21 14:07:36 +00:00
type streamServiceClient struct {
2024-10-19 14:36:33 +00:00
cc grpc . ClientConnInterface
}
2024-10-21 14:07:36 +00:00
func NewStreamServiceClient ( cc grpc . ClientConnInterface ) StreamServiceClient {
return & streamServiceClient { cc }
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
func ( c * streamServiceClient ) CountStreamConnection ( ctx context . Context , in * CountConnectionRequest , opts ... grpc . CallOption ) ( * CountConnectionResponse , error ) {
2024-10-19 14:36:33 +00:00
out := new ( CountConnectionResponse )
2024-11-02 17:40:36 +00:00
err := c . cc . Invoke ( ctx , "/proto.StreamService/CountStreamConnection" , in , out , opts ... )
2024-10-19 14:36:33 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-10-21 14:07:36 +00:00
func ( c * streamServiceClient ) PushStream ( ctx context . Context , in * PushStreamRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error ) {
2024-10-19 14:36:33 +00:00
out := new ( PushStreamResponse )
2024-11-02 17:40:36 +00:00
err := c . cc . Invoke ( ctx , "/proto.StreamService/PushStream" , in , out , opts ... )
2024-10-19 14:36:33 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-10-21 14:07:36 +00:00
func ( c * streamServiceClient ) PushStreamBatch ( ctx context . Context , in * PushStreamBatchRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error ) {
2024-10-19 14:36:33 +00:00
out := new ( PushStreamResponse )
2024-11-02 17:40:36 +00:00
err := c . cc . Invoke ( ctx , "/proto.StreamService/PushStreamBatch" , in , out , opts ... )
2024-10-19 14:36:33 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-10-21 14:07:36 +00:00
// StreamServiceServer is the server API for StreamService service.
// All implementations must embed UnimplementedStreamServiceServer
2024-11-02 17:40:36 +00:00
// for forward compatibility
2024-10-21 14:07:36 +00:00
type StreamServiceServer interface {
2024-10-19 14:36:33 +00:00
CountStreamConnection ( context . Context , * CountConnectionRequest ) ( * CountConnectionResponse , error )
PushStream ( context . Context , * PushStreamRequest ) ( * PushStreamResponse , error )
PushStreamBatch ( context . Context , * PushStreamBatchRequest ) ( * PushStreamResponse , error )
2024-10-21 14:07:36 +00:00
mustEmbedUnimplementedStreamServiceServer ( )
2024-10-19 14:36:33 +00:00
}
2024-11-02 17:40:36 +00:00
// UnimplementedStreamServiceServer must be embedded to have forward compatible implementations.
type UnimplementedStreamServiceServer struct {
}
2024-10-19 14:36:33 +00:00
2024-10-21 14:07:36 +00:00
func ( UnimplementedStreamServiceServer ) CountStreamConnection ( context . Context , * CountConnectionRequest ) ( * CountConnectionResponse , error ) {
2024-10-19 14:36:33 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method CountStreamConnection not implemented" )
}
2024-10-21 14:07:36 +00:00
func ( UnimplementedStreamServiceServer ) PushStream ( context . Context , * PushStreamRequest ) ( * PushStreamResponse , error ) {
2024-10-19 14:36:33 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method PushStream not implemented" )
}
2024-10-21 14:07:36 +00:00
func ( UnimplementedStreamServiceServer ) PushStreamBatch ( context . Context , * PushStreamBatchRequest ) ( * PushStreamResponse , error ) {
2024-10-19 14:36:33 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method PushStreamBatch not implemented" )
}
2024-10-21 14:07:36 +00:00
func ( UnimplementedStreamServiceServer ) mustEmbedUnimplementedStreamServiceServer ( ) { }
2024-10-19 14:36:33 +00:00
2024-10-21 14:07:36 +00:00
// 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
2024-10-19 14:36:33 +00:00
// result in compilation errors.
2024-10-21 14:07:36 +00:00
type UnsafeStreamServiceServer interface {
mustEmbedUnimplementedStreamServiceServer ( )
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
func RegisterStreamServiceServer ( s grpc . ServiceRegistrar , srv StreamServiceServer ) {
s . RegisterService ( & StreamService_ServiceDesc , srv )
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
func _StreamService_CountStreamConnection_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-10-19 14:36:33 +00:00
in := new ( CountConnectionRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv . ( StreamServiceServer ) . CountStreamConnection ( ctx , in )
2024-10-19 14:36:33 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-11-02 17:40:36 +00:00
FullMethod : "/proto.StreamService/CountStreamConnection" ,
2024-10-19 14:36:33 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-10-21 14:07:36 +00:00
return srv . ( StreamServiceServer ) . CountStreamConnection ( ctx , req . ( * CountConnectionRequest ) )
2024-10-19 14:36:33 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-10-21 14:07:36 +00:00
func _StreamService_PushStream_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-10-19 14:36:33 +00:00
in := new ( PushStreamRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv . ( StreamServiceServer ) . PushStream ( ctx , in )
2024-10-19 14:36:33 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-11-02 17:40:36 +00:00
FullMethod : "/proto.StreamService/PushStream" ,
2024-10-19 14:36:33 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-10-21 14:07:36 +00:00
return srv . ( StreamServiceServer ) . PushStream ( ctx , req . ( * PushStreamRequest ) )
2024-10-19 14:36:33 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-10-21 14:07:36 +00:00
func _StreamService_PushStreamBatch_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-10-19 14:36:33 +00:00
in := new ( PushStreamBatchRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv . ( StreamServiceServer ) . PushStreamBatch ( ctx , in )
2024-10-19 14:36:33 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-11-02 17:40:36 +00:00
FullMethod : "/proto.StreamService/PushStreamBatch" ,
2024-10-19 14:36:33 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-10-21 14:07:36 +00:00
return srv . ( StreamServiceServer ) . PushStreamBatch ( ctx , req . ( * PushStreamBatchRequest ) )
2024-10-19 14:36:33 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-10-21 14:07:36 +00:00
// StreamService_ServiceDesc is the grpc.ServiceDesc for StreamService service.
2024-10-19 14:36:33 +00:00
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
2024-10-21 14:07:36 +00:00
var StreamService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "proto.StreamService" ,
HandlerType : ( * StreamServiceServer ) ( nil ) ,
2024-10-19 14:36:33 +00:00
Methods : [ ] grpc . MethodDesc {
{
MethodName : "CountStreamConnection" ,
2024-10-21 14:07:36 +00:00
Handler : _StreamService_CountStreamConnection_Handler ,
2024-10-19 14:36:33 +00:00
} ,
{
MethodName : "PushStream" ,
2024-10-21 14:07:36 +00:00
Handler : _StreamService_PushStream_Handler ,
2024-10-19 14:36:33 +00:00
} ,
{
MethodName : "PushStreamBatch" ,
2024-10-21 14:07:36 +00:00
Handler : _StreamService_PushStreamBatch_Handler ,
2024-10-19 14:36:33 +00:00
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "stream.proto" ,
}