2024-10-19 14:36:33 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - 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.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
const (
2024-10-21 14:07:36 +00:00
StreamService_CountStreamConnection_FullMethodName = "/proto.StreamService/CountStreamConnection"
StreamService_PushStream_FullMethodName = "/proto.StreamService/PushStream"
StreamService_PushStreamBatch_FullMethodName = "/proto.StreamService/PushStreamBatch"
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
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( CountConnectionResponse )
2024-10-21 14:07:36 +00:00
err := c . cc . Invoke ( ctx , StreamService_CountStreamConnection_FullMethodName , in , out , cOpts ... )
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
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( PushStreamResponse )
2024-10-21 14:07:36 +00:00
err := c . cc . Invoke ( ctx , StreamService_PushStream_FullMethodName , in , out , cOpts ... )
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
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( PushStreamResponse )
2024-10-21 14:07:36 +00:00
err := c . cc . Invoke ( ctx , StreamService_PushStreamBatch_FullMethodName , in , out , cOpts ... )
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-10-19 14:36:33 +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-10-21 14:07:36 +00:00
// UnimplementedStreamServiceServer must be embedded to have
2024-10-19 14:36:33 +00:00
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
2024-10-21 14:07:36 +00:00
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 ( ) { }
func ( UnimplementedStreamServiceServer ) testEmbeddedByValue ( ) { }
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 ) {
// If the following call pancis, it indicates UnimplementedStreamServiceServer was
2024-10-19 14:36:33 +00:00
// 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 ( )
}
2024-10-21 14:07:36 +00:00
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-10-21 14:07:36 +00:00
FullMethod : StreamService_CountStreamConnection_FullMethodName ,
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-10-21 14:07:36 +00:00
FullMethod : StreamService_PushStream_FullMethodName ,
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-10-21 14:07:36 +00:00
FullMethod : StreamService_PushStreamBatch_FullMethodName ,
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" ,
}